]> xenbits.xensource.com Git - pvdrivers/win/xeniface.git/commitdiff
Avoid unnecessary assertion.
authorTroy Crosley <troycrosley@gmail.com>
Tue, 1 Sep 2020 17:27:39 +0000 (13:27 -0400)
committerPaul Durrant <pdurrant@amazon.com>
Fri, 4 Sep 2020 09:57:55 +0000 (10:57 +0100)
Add the missing brackets to an if statement so that FdoS4ToS3() is not
always called in __FdoSetSystemPowerUp().

Signed-off-by: Troy Crosley <troycrosley@gmail.com>
Reviewed-by: Owen Smith <owen.smith@citrix.com>
src/xeniface/fdo.c

index 1f859cdb639d2fda64bad3cbf274576d65124a54..6aabf96633fdb7c0db41e03c6962292cf46d0d8e 100644 (file)
@@ -1740,9 +1740,10 @@ __FdoSetSystemPowerUp(
         goto done;
 
     if (SystemState < PowerSystemHibernate &&
-        __FdoGetSystemPowerState(Fdo) >= PowerSystemHibernate)
+        __FdoGetSystemPowerState(Fdo) >= PowerSystemHibernate) {
         __FdoSetSystemPowerState(Fdo, PowerSystemHibernate);
         FdoS4ToS3(Fdo);
+    }
 
     Info("%s -> %s\n",
          PowerSystemStateName(__FdoGetSystemPowerState(Fdo)),