* [PATCH v2] thermal: bcm2835: Fix error code in 'bcm2835_thermal_probe'
@ 2017-06-23 19:44 Christophe JAILLET
2017-06-23 20:25 ` Stefan Wahren
0 siblings, 1 reply; 3+ messages in thread
From: Christophe JAILLET @ 2017-06-23 19:44 UTC (permalink / raw)
To: rui.zhang, edubezval, eric, stefan.wahren, f.fainelli, rjui,
sbranden, bcm-kernel-feedback-list, kernel, rafal
Cc: linux-pm, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
kernel-janitors, Christophe JAILLET
'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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] thermal: bcm2835: Fix error code in 'bcm2835_thermal_probe'
2017-06-23 19:44 [PATCH v2] thermal: bcm2835: Fix error code in 'bcm2835_thermal_probe' Christophe JAILLET
@ 2017-06-23 20:25 ` Stefan Wahren
2017-07-01 2:55 ` Eduardo Valentin
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Wahren @ 2017-06-23 20:25 UTC (permalink / raw)
To: Christophe JAILLET, rjui, sbranden, kernel, rafal, eric,
rui.zhang, bcm-kernel-feedback-list, f.fainelli, edubezval
Cc: linux-kernel, linux-pm, linux-rpi-kernel, linux-arm-kernel
> Christophe JAILLET <christophe.jaillet@wanadoo.fr> hat am 23. Juni 2017 um 21:44 geschrieben:
>
>
> '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>
Thanks, but Dan Carpenter already send a fix for this.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] thermal: bcm2835: Fix error code in 'bcm2835_thermal_probe'
2017-06-23 20:25 ` Stefan Wahren
@ 2017-07-01 2:55 ` Eduardo Valentin
0 siblings, 0 replies; 3+ messages in thread
From: Eduardo Valentin @ 2017-07-01 2:55 UTC (permalink / raw)
To: Stefan Wahren
Cc: Christophe JAILLET, rjui, sbranden, kernel, rafal, eric,
rui.zhang, bcm-kernel-feedback-list, f.fainelli, linux-kernel,
linux-pm, linux-rpi-kernel, linux-arm-kernel
On Fri, Jun 23, 2017 at 10:25:45PM +0200, Stefan Wahren wrote:
>
> > Christophe JAILLET <christophe.jaillet@wanadoo.fr> hat am 23. Juni 2017 um 21:44 geschrieben:
> >
> >
> > '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>
>
> Thanks, but Dan Carpenter already send a fix for this.
Yeah, and I applied Dan's version as it was coming first in my queue. Sorry.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-01 2:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-23 19:44 [PATCH v2] thermal: bcm2835: Fix error code in 'bcm2835_thermal_probe' Christophe JAILLET
2017-06-23 20:25 ` Stefan Wahren
2017-07-01 2:55 ` Eduardo Valentin
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).