summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/power.c
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2008-04-18 22:27:29 +0200
committerLen Brown <len.brown@intel.com>2008-04-29 16:10:03 +0200
commita815ab8b5891f3d2515316655729272f68269e3b (patch)
tree3554f9425dcd3bcb29e1ec279a44f1fff8e84c27 /drivers/acpi/power.c
parent#if 0 acpi/bay.c:eject_removable_drive() (diff)
downloadlinux-a815ab8b5891f3d2515316655729272f68269e3b.tar.xz
linux-a815ab8b5891f3d2515316655729272f68269e3b.zip
ACPI: check a return value correctly in acpi_power_get_context()
We should check *resource != NULL rather than resource != NULL, which will be always true. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/power.c')
-rw-r--r--drivers/acpi/power.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 76bf6d90c700..f2a76acecfcd 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -121,7 +121,7 @@ acpi_power_get_context(acpi_handle handle,
}
*resource = acpi_driver_data(device);
- if (!resource)
+ if (!*resource)
return -ENODEV;
return 0;