mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 09:13:55 +08:00
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>
This commit is contained in:
parent
2a241d77cf
commit
a815ab8b58
@ -121,7 +121,7 @@ acpi_power_get_context(acpi_handle handle,
|
||||
}
|
||||
|
||||
*resource = acpi_driver_data(device);
|
||||
if (!resource)
|
||||
if (!*resource)
|
||||
return -ENODEV;
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user