* [PATCH] thermal: bcm2835: fix an error code in probe()
@ 2017-06-14 9:13 Dan Carpenter
2017-06-14 17:12 ` Stefan Wahren
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-06-14 9:13 UTC (permalink / raw)
To: Zhang Rui, Stefan Wahren
Cc: Eduardo Valentin, Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, Eric Anholt, Rafał Miłecki,
Martin Sperl, linux-pm, kernel-janitors
This causes a static checker because we're passing a valid pointer to
PTR_ERR(). "err" is already the correct error code, so we can just
delete this line.
Fixes: bcb7dd9ef206 ("thermal: bcm2835: add thermal driver for bcm2835 SoC")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] thermal: bcm2835: fix an error code in probe()
2017-06-14 9:13 [PATCH] thermal: bcm2835: fix an error code in probe() Dan Carpenter
@ 2017-06-14 17:12 ` Stefan Wahren
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Wahren @ 2017-06-14 17:12 UTC (permalink / raw)
To: Dan Carpenter, Zhang Rui
Cc: Ray Jui, Scott Branden, Rafał Miłecki, Martin Sperl,
Eric Anholt, kernel-janitors, bcm-kernel-feedback-list,
Florian Fainelli, linux-pm, Eduardo Valentin
> Dan Carpenter <dan.carpenter@oracle.com> hat am 14. Juni 2017 um 11:13 geschrieben:
>
>
> This causes a static checker because we're passing a valid pointer to
> PTR_ERR(). "err" is already the correct error code, so we can just
> delete this line.
>
> Fixes: bcb7dd9ef206 ("thermal: bcm2835: add thermal driver for bcm2835 SoC")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> 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);
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Thanks
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-14 17:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-14 9:13 [PATCH] thermal: bcm2835: fix an error code in probe() Dan Carpenter
2017-06-14 17:12 ` Stefan Wahren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox