From: Zhang Rui <rui.zhang@intel.com>
To: Devendra Naga <devendra.aaru@gmail.com>
Cc: linux-pm@vger.kernel.org
Subject: Re: [PATCH 2/2] thermal: exynos_thermal: return a proper error code while thermal_zone_device_register fail.
Date: Mon, 11 Mar 2013 22:47:34 +0800 [thread overview]
Message-ID: <1363013254.2291.81.camel@rzhang1-mobl4> (raw)
In-Reply-To: <1362415968-2210-2-git-send-email-devendra.aaru@gmail.com>
On Mon, 2013-03-04 at 11:52 -0500, Devendra Naga wrote:
> we are returning EINVAL while the thermal_zone_device_register function fail.
> instead we can use the return value from the thermal_zone_device_register by
> using PTR_ERR.
>
> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
applied to thermal -next.
thanks,
rui
> ---
> drivers/thermal/exynos_thermal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c
> index e04ebd8..46568c0 100644
> --- a/drivers/thermal/exynos_thermal.c
> +++ b/drivers/thermal/exynos_thermal.c
> @@ -476,7 +476,7 @@ static int exynos_register_thermal(struct thermal_sensor_conf *sensor_conf)
>
> if (IS_ERR(th_zone->therm_dev)) {
> pr_err("Failed to register thermal zone device\n");
> - ret = -EINVAL;
> + ret = PTR_ERR(th_zone->therm_dev);
> goto err_unregister;
> }
> th_zone->mode = THERMAL_DEVICE_ENABLED;
next prev parent reply other threads:[~2013-03-11 14:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 16:52 [PATCH 1/2] thermal: rcar_thermal: propagate return value of thermal_zone_device_register Devendra Naga
2013-03-04 16:52 ` [PATCH 2/2] thermal: exynos_thermal: return a proper error code while thermal_zone_device_register fail Devendra Naga
2013-03-11 14:47 ` Zhang Rui [this message]
2013-03-11 14:47 ` [PATCH 1/2] thermal: rcar_thermal: propagate return value of thermal_zone_device_register Zhang Rui
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=1363013254.2291.81.camel@rzhang1-mobl4 \
--to=rui.zhang@intel.com \
--cc=devendra.aaru@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).