From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: rui.zhang@intel.com, edubezval@gmail.com, eric@anholt.net,
stefan.wahren@i2se.com, f.fainelli@gmail.com, rjui@broadcom.com,
sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com,
kernel@martin.sperl.org, rafal@milecki.pl
Cc: linux-pm@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Subject: [PATCH v2] thermal: bcm2835: Fix error code in 'bcm2835_thermal_probe'
Date: Fri, 23 Jun 2017 21:44:35 +0200 [thread overview]
Message-ID: <20170623194435.8094-1-christophe.jaillet@wanadoo.fr> (raw)
'tz' is a valid pointer at this point, so calling PTR_ERR on it is
pointless.
This 'err = PTR_ERR(tz)' looks like a cut'n'paste from a few lines above.
So remove it. 'err' is already the error we want to report.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
v2: fix empty subject
---
drivers/thermal/broadcom/bcm2835_thermal.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/thermal/broadcom/bcm2835_thermal.c b/drivers/thermal/broadcom/bcm2835_thermal.c
index 0ecf80890c84..e6863c841662 100644
--- a/drivers/thermal/broadcom/bcm2835_thermal.c
+++ b/drivers/thermal/broadcom/bcm2835_thermal.c
@@ -245,7 +245,6 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
*/
err = tz->ops->get_trip_temp(tz, 0, &trip_temp);
if (err < 0) {
- err = PTR_ERR(tz);
dev_err(&pdev->dev,
"Not able to read trip_temp: %d\n",
err);
--
2.11.0
next reply other threads:[~2017-06-23 19:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-23 19:44 Christophe JAILLET [this message]
2017-06-23 20:25 ` [PATCH v2] thermal: bcm2835: Fix error code in 'bcm2835_thermal_probe' Stefan Wahren
2017-07-01 2:55 ` Eduardo Valentin
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=20170623194435.8094-1-christophe.jaillet@wanadoo.fr \
--to=christophe.jaillet@wanadoo.fr \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=edubezval@gmail.com \
--cc=eric@anholt.net \
--cc=f.fainelli@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kernel@martin.sperl.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=rafal@milecki.pl \
--cc=rjui@broadcom.com \
--cc=rui.zhang@intel.com \
--cc=sbranden@broadcom.com \
--cc=stefan.wahren@i2se.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