public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Axel Lin <axel.lin@gmail.com>, Kevin Hilman <khilman@ti.com>
Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	cpufreq@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH] cpufreq: OMAP: Check IS_ERR() instead of NULL for omap_device_get_by_hwmod_name
Date: Tue, 18 Sep 2012 20:52:57 +0200	[thread overview]
Message-ID: <201209182052.57414.rjw@sisk.pl> (raw)
In-Reply-To: <1347932747.6562.3.camel@phoenix>

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@gmail.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");
> 


  reply	other threads:[~2012-09-18 18:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-18  1:45 [PATCH] cpufreq: OMAP: Check IS_ERR() instead of NULL for omap_device_get_by_hwmod_name Axel Lin
2012-09-18 18:52 ` Rafael J. Wysocki [this message]
2012-09-19 16:51   ` Kevin Hilman
2012-09-19 20:17     ` Rafael J. Wysocki

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=201209182052.57414.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=axel.lin@gmail.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=khilman@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    /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