From: Zhao Yakui <yakui.zhao@intel.com>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ACPI: check a return value correctly in acpi_power_get_context()
Date: Tue, 08 Apr 2008 16:38:26 +0800 [thread overview]
Message-ID: <1207643906.7387.0.camel@yakui_zhao.sh.intel.com> (raw)
In-Reply-To: <47F9E1E2.5020506@cn.fujitsu.com>
On Mon, 2008-04-07 at 16:57 +0800, Li Zefan wrote:
> We should check *resource != NULL rather than resource != NULL,
> which will be always true.
>
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
> ---
> drivers/acpi/power.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
> index 76bf6d9..f2a76ac 100644
> --- a/drivers/acpi/power.c
> +++ b/drivers/acpi/power.c
> @@ -121,7 +121,7 @@ acpi_power_get_context(acpi_handle handle,
> }
>
> *resource = acpi_driver_data(device);
> - if (!resource)
> + if (!*resource)
> return -ENODEV;
>
> return 0;
agreed.
prev parent reply other threads:[~2008-04-08 0:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-07 8:57 Li Zefan
2008-04-08 8:38 ` Zhao Yakui [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=1207643906.7387.0.camel@yakui_zhao.sh.intel.com \
--to=yakui.zhao@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®