提交 f3500980 编写于 作者: W Wei Ni 提交者: Eduardo Valentin

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: NWei Ni <wni@nvidia.com>
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
上级 a977c41e
......@@ -223,10 +223,7 @@ static int thermtrip_program(struct device *dev,
int temp;
u32 r;
if (!dev || !sg)
return -EINVAL;
if (!sg->thermtrip_threshold_mask)
if (!sg || !sg->thermtrip_threshold_mask)
return -EINVAL;
temp = enforce_temp_range(dev, trip_temp) / ts->soc->thresh_grain;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册