Re: [PATCH] thermal: bcm2835: fix an error code in probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Dan Carpenter <dan.carpenter@xxxxxxxxxx> 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@xxxxxxxxxx>
> 
> 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@xxxxxxxx>

Thanks
Stefan
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux