소스 검색

thermal: tegra: remove null check for dev pointer

The dev pointer is going through a null check after a dereference.
So this patch removes that useless check since the driver does not
pass a null dev pointer in any case.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Nicolin Chen 8 년 전
부모
커밋
1fba81cc09
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/thermal/tegra/soctherm.c

+ 1 - 1
drivers/thermal/tegra/soctherm.c

@@ -483,7 +483,7 @@ static int throttrip_program(struct device *dev,
 	unsigned int throt;
 	u32 r, reg_off;
 
-	if (!dev || !sg || !stc || !stc->init)
+	if (!sg || !stc || !stc->init)
 		return -EINVAL;
 
 	temp = enforce_temp_range(dev, trip_temp) / ts->soc->thresh_grain;