mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04: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 <[email protected]> Acked-by: Zhao Yakui <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Len Brown <[email protected]>
This commit is contained in:
parent
2a241d77cf
commit
a815ab8b58
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue