]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
thermal: bcm2835: fix an error code in probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 14 Jun 2017 09:13:27 +0000 (12:13 +0300)
committerEduardo Valentin <edubezval@gmail.com>
Fri, 30 Jun 2017 23:46:11 +0000 (16:46 -0700)
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")
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/broadcom/bcm2835_thermal.c

index 0ecf80890c84feb857d65ee90f83fcb183ade3db..e6863c84166275ee7a89b0de85c3767fc91bb271 100644 (file)
@@ -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);