* [patch 8/9] acpi: check a return value correctly in acpi_power_get_context()
@ 2008-04-18 20:27 akpm
2008-04-29 8:14 ` Len Brown
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2008-04-18 20:27 UTC (permalink / raw)
To: lenb; +Cc: linux-acpi, akpm, lizf, yakui.zhao
From: Li Zefan <lizf@cn.fujitsu.com>
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>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/acpi/power.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/acpi/power.c~acpi-check-a-return-value-correctly-in-acpi_power_get_context drivers/acpi/power.c
--- a/drivers/acpi/power.c~acpi-check-a-return-value-correctly-in-acpi_power_get_context
+++ a/drivers/acpi/power.c
@@ -121,7 +121,7 @@ acpi_power_get_context(acpi_handle handl
}
*resource = acpi_driver_data(device);
- if (!resource)
+ if (!*resource)
return -ENODEV;
return 0;
_
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch 8/9] acpi: check a return value correctly in acpi_power_get_context()
2008-04-18 20:27 [patch 8/9] acpi: check a return value correctly in acpi_power_get_context() akpm
@ 2008-04-29 8:14 ` Len Brown
0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2008-04-29 8:14 UTC (permalink / raw)
To: akpm; +Cc: linux-acpi, lizf, yakui.zhao
applied.
thanks,
-len
On Friday 18 April 2008, akpm@linux-foundation.org wrote:
> From: Li Zefan <lizf@cn.fujitsu.com>
>
> 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>
> Cc: Len Brown <lenb@kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/acpi/power.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -puN drivers/acpi/power.c~acpi-check-a-return-value-correctly-in-acpi_power_get_context drivers/acpi/power.c
> --- a/drivers/acpi/power.c~acpi-check-a-return-value-correctly-in-acpi_power_get_context
> +++ a/drivers/acpi/power.c
> @@ -121,7 +121,7 @@ acpi_power_get_context(acpi_handle handl
> }
>
> *resource = acpi_driver_data(device);
> - if (!resource)
> + if (!*resource)
> return -ENODEV;
>
> return 0;
> _
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-29 8:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-18 20:27 [patch 8/9] acpi: check a return value correctly in acpi_power_get_context() akpm
2008-04-29 8:14 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox