summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apm_32.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-11-16 10:16:28 +0100
committerIngo Molnar <mingo@kernel.org>2016-11-16 10:16:28 +0100
commit0acbc7aa4713b450ff46f9c9f6ce0060ea6947b1 (patch)
tree480508a78b7d9e9c0da0ffbd33b40e0b4e076a16 /arch/x86/kernel/apm_32.c
parent353c50ebe329daaf2c94dc41c1c481cbba2a31fd (diff)
parent81bcfe5e48f9b8c42cf547f1c74c7f60c44c34c8 (diff)
downloadlinux-0acbc7aa4713b450ff46f9c9f6ce0060ea6947b1.tar.bz2
Merge branch 'linus' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/apm_32.c')
-rw-r--r--arch/x86/kernel/apm_32.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index d90749b883f5..643818a7688b 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -1042,8 +1042,11 @@ static int apm_get_power_status(u_short *status, u_short *bat, u_short *life)
if (apm_info.get_power_status_broken)
return APM_32_UNSUPPORTED;
- if (apm_bios_call(&call))
+ if (apm_bios_call(&call)) {
+ if (!call.err)
+ return APM_NO_ERROR;
return call.err;
+ }
*status = call.ebx;
*bat = call.ecx;
if (apm_info.get_power_status_swabinminutes) {