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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 18 Sep 2012 20:52:57 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Axel Lin <axel.lin@...il.com>, Kevin Hilman <khilman@...com>
Cc:	linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
	cpufreq@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH] cpufreq: OMAP: Check IS_ERR() instead of NULL for omap_device_get_by_hwmod_name

On Tuesday, September 18, 2012, Axel Lin wrote:
> omap_device_get_by_hwmod_name() returns ERR_PTR on error.
> 
> Signed-off-by: Axel Lin <axel.lin@...il.com>

Kevin, should I take this?

Rafael


> ---
>  drivers/cpufreq/omap-cpufreq.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
> index 6e22f44..65f8e9a 100644
> --- a/drivers/cpufreq/omap-cpufreq.c
> +++ b/drivers/cpufreq/omap-cpufreq.c
> @@ -266,9 +266,9 @@ static int __init omap_cpufreq_init(void)
>  	}
>  
>  	mpu_dev = omap_device_get_by_hwmod_name("mpu");
> -	if (!mpu_dev) {
> +	if (IS_ERR(mpu_dev)) {
>  		pr_warning("%s: unable to get the mpu device\n", __func__);
> -		return -EINVAL;
> +		return PTR_ERR(mpu_dev);
>  	}
>  
>  	mpu_reg = regulator_get(mpu_dev, "vcc");
> 

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