diff --git a/hw/xfree86/os-support/linux/lnx_apm.c b/hw/xfree86/os-support/linux/lnx_apm.c index 29c363360..b928febf6 100644 --- a/hw/xfree86/os-support/linux/lnx_apm.c +++ b/hw/xfree86/os-support/linux/lnx_apm.c @@ -138,13 +138,14 @@ xf86OSPMOpen(void) #ifdef HAVE_ACPI /* Favour ACPI over APM, but only when enabled */ - if (!xf86acpiDisableFlag) + if (!xf86acpiDisableFlag) { ret = lnxACPIOpen(); - - if (!ret) + if (ret) + return ret; + } #endif #ifdef HAVE_APM - ret = lnxAPMOpen(); + ret = lnxAPMOpen(); #endif return ret;