thermal: tegra: fix static checker warning
There has a static checker warning: warn: variable dereferenced before check 'dev' (see line 222) Since check 'dev' is unnecessary, so remove this check. Fixes: ee6d79f202a4 ("thermal: tegra: add thermtrip function") Signed-off-by: Wei Ni <wni@nvidia.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
This commit is contained in:
parent
a977c41ec6
commit
f350098070
@ -223,10 +223,7 @@ static int thermtrip_program(struct device *dev,
|
|||||||
int temp;
|
int temp;
|
||||||
u32 r;
|
u32 r;
|
||||||
|
|
||||||
if (!dev || !sg)
|
if (!sg || !sg->thermtrip_threshold_mask)
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
if (!sg->thermtrip_threshold_mask)
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
temp = enforce_temp_range(dev, trip_temp) / ts->soc->thresh_grain;
|
temp = enforce_temp_range(dev, trip_temp) / ts->soc->thresh_grain;
|
||||||
|
Loading…
Reference in New Issue
Block a user