From: Devendra Naga <devendra.aaru@gmail.com>
To: Zhang Rui <rui.zhang@intel.com>, linux-pm@vger.kernel.org
Cc: Devendra Naga <devendra.aaru@gmail.com>
Subject: [PATCH] thermal: fair_share: check for a valid thermal zone device
Date: Sat, 30 Mar 2013 15:34:37 +0530 [thread overview]
Message-ID: <1364637877-28068-1-git-send-email-devendra.aaru@gmail.com> (raw)
to be on safe side check for a valid thermal zone device and fail if there
is no thermal zone device.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
drivers/thermal/fair_share.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/fair_share.c b/drivers/thermal/fair_share.c
index 792479f..4cd1d47 100644
--- a/drivers/thermal/fair_share.c
+++ b/drivers/thermal/fair_share.c
@@ -85,7 +85,7 @@ static int fair_share_throttle(struct thermal_zone_device *tz, int trip)
int i;
int cur_trip_level = get_trip_level(tz);
- if (!tz->tzp || !tz->tzp->tbp)
+ if (!tz || !tz->tzp || !tz->tzp->tbp)
return -EINVAL;
tzp = tz->tzp;
--
1.8.1.4
next reply other threads:[~2013-03-30 10:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-30 10:04 Devendra Naga [this message]
2013-04-01 1:05 ` [PATCH] thermal: fair_share: check for a valid thermal zone device 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=1364637877-28068-1-git-send-email-devendra.aaru@gmail.com \
--to=devendra.aaru@gmail.com \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.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).