Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a815ab8b authored by Li Zefan's avatar Li Zefan Committed by Len Brown
Browse files

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: default avatarLi Zefan <lizf@cn.fujitsu.com>
Acked-by: default avatarZhao Yakui <yakui.zhao@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 2a241d77
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ acpi_power_get_context(acpi_handle handle,
	}

	*resource = acpi_driver_data(device);
	if (!resource)
	if (!*resource)
		return -ENODEV;

	return 0;