mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
PcAtChipsetPkg: Fix conditionally uninitialized variables
Fixes CodeQL alerts for CWE-457: https://cwe.mitre.org/data/definitions/457.html Cc: Erich McMillan <emcmillan@microsoft.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Ray Ni <ray.ni@intel.com> Co-authored-by: Erich McMillan <emcmillan@microsoft.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Oliver Smith-Denny <osd@smith-denny.com>
This commit is contained in:
parent
3fab32d41d
commit
7dc182ed1e
@ -345,7 +345,7 @@ PcRtcInit (
|
|||||||
// so we can use them to get and set wakeup time.
|
// so we can use them to get and set wakeup time.
|
||||||
//
|
//
|
||||||
Status = PcRtcGetWakeupTime (&Enabled, &Pending, &Time, Global);
|
Status = PcRtcGetWakeupTime (&Enabled, &Pending, &Time, Global);
|
||||||
if ((Enabled) || (!EFI_ERROR (Status))) {
|
if ((!EFI_ERROR (Status)) || (Enabled)) {
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -838,8 +838,11 @@ PcRtcSetWakeupTime (
|
|||||||
//
|
//
|
||||||
// Just support set alarm time within 24 hours
|
// Just support set alarm time within 24 hours
|
||||||
//
|
//
|
||||||
PcRtcGetTime (&RtcTime, &Capabilities, Global);
|
Status = PcRtcGetTime (&RtcTime, &Capabilities, Global);
|
||||||
|
if (!EFI_ERROR (Status)) {
|
||||||
Status = RtcTimeFieldsValid (&RtcTime);
|
Status = RtcTimeFieldsValid (&RtcTime);
|
||||||
|
}
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user