From: Zhang Rui <rui.zhang@intel.com>
To: Rhyland Klein <rklein@nvidia.com>,
Eduardo Valentin <edubezval@gmail.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH] thermal: helpers: Check return value of get_temp
Date: Thu, 28 Jul 2016 16:50:03 +0800 [thread overview]
Message-ID: <1469695803.2367.106.camel@intel.com> (raw)
In-Reply-To: <7cf6dc8c-d914-d978-8550-440717bd9b77@nvidia.com>
On 二, 2016-07-05 at 12:22 -0400, Rhyland Klein wrote:
> On 6/6/2016 12:53 PM, Rhyland Klein wrote:
> >
> > Check the return value of get_temp, which can fail. If it does,
> > then
> > unlock and return the error code.
> >
> > Signed-off-by: Rhyland Klein <rklein@nvidia.com>
> > ---
> > drivers/thermal/thermal_helpers.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/thermal/thermal_helpers.c
> > b/drivers/thermal/thermal_helpers.c
> > index 5e1c160944c9..dc260749f8d6 100644
> > --- a/drivers/thermal/thermal_helpers.c
> > +++ b/drivers/thermal/thermal_helpers.c
> > @@ -90,6 +90,10 @@ int thermal_zone_get_temp(struct
> > thermal_zone_device *tz, int *temp)
> > mutex_lock(&tz->lock);
> >
> > ret = tz->ops->get_temp(tz, temp);
> > + if (!ret) {
> > + mutex_unlock(&tz->lock);
> > + goto exit;
> > + }
> >
> > if (IS_ENABLED(CONFIG_THERMAL_EMULATION) && tz-
> > >emul_temperature) {
> > for (count = 0; count < tz->trips; count++) {
> >
> I haven't seen any comments on this patch, has anyone had a chance to
> review it yet?
Patch applied, it would be merged together with the thermal reorg
patches.
thanks,
rui
prev parent reply other threads:[~2016-07-28 8:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 16:53 [RESEND PATCH] thermal: helpers: Check return value of get_temp Rhyland Klein
2016-06-23 17:40 ` Rhyland Klein
2016-07-05 16:22 ` Rhyland Klein
2016-07-28 8:50 ` Zhang Rui [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=1469695803.2367.106.camel@intel.com \
--to=rui.zhang@intel.com \
--cc=edubezval@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rklein@nvidia.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;
as well as URLs for NNTP newsgroup(s).