소스 검색

thermal: bcm2835: fix an error code in probe()

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>
Dan Carpenter 8 년 전
부모
커밋
1fe3854a83
1개의 변경된 파일0개의 추가작업 그리고 1개의 파일을 삭제
  1. 0 1
      drivers/thermal/broadcom/bcm2835_thermal.c

+ 0 - 1
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);