lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1207643906.7387.0.camel@yakui_zhao.sh.intel.com>
Date:	Tue, 08 Apr 2008 16:38:26 +0800
From:	Zhao Yakui <yakui.zhao@...el.com>
To:	Li Zefan <lizf@...fujitsu.com>
Cc:	lenb@...nel.org, linux-acpi@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ACPI: check a return value correctly in
	acpi_power_get_context()

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@...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.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ