From: Len Brown <lenb@kernel.org>
To: akpm@linux-foundation.org
Cc: linux-acpi@vger.kernel.org, lizf@cn.fujitsu.com, yakui.zhao@intel.com
Subject: Re: [patch 8/9] acpi: check a return value correctly in acpi_power_get_context()
Date: Tue, 29 Apr 2008 04:14:18 -0400 [thread overview]
Message-ID: <200804290414.19227.lenb@kernel.org> (raw)
In-Reply-To: <200804182027.m3IKRTq7013561@imap1.linux-foundation.org>
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
>
prev parent reply other threads:[~2008-04-29 8:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200804290414.19227.lenb@kernel.org \
--to=lenb@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-acpi@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=yakui.zhao@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.