* re: thermal: tegra: add thermtrip function
@ 2016-04-02 5:50 Dan Carpenter
2016-04-06 9:01 ` Wei Ni
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-04-02 5:50 UTC (permalink / raw)
To: wni-DDmLM1+adcrQT0dZR+AlfA; +Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA
Hello Wei Ni,
This is a semi-automatic email about new static checker warnings.
The patch ee6d79f202a4: "thermal: tegra: add thermtrip function" from
Mar 29, 2016, leads to the following Smatch complaint:
drivers/thermal/tegra/soctherm.c:226 thermtrip_program()
warn: variable dereferenced before check 'dev' (see line 222)
drivers/thermal/tegra/soctherm.c
221 {
222 struct tegra_soctherm *ts = dev_get_drvdata(dev);
^^^^^^^^^^^^^^^^^^^
Dereference inside function.
223 int temp;
224 u32 r;
225
226 if (!dev || !sg)
^^^^
Too late.
227 return -EINVAL;
228
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: thermal: tegra: add thermtrip function
2016-04-02 5:50 thermal: tegra: add thermtrip function Dan Carpenter
@ 2016-04-06 9:01 ` Wei Ni
0 siblings, 0 replies; 2+ messages in thread
From: Wei Ni @ 2016-04-06 9:01 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA
Thanks for your check, I will send out patch to fix it.
Thanks.
Wei.
On 2016年04月02日 13:50, Dan Carpenter wrote:
> Hello Wei Ni,
>
> This is a semi-automatic email about new static checker warnings.
>
> The patch ee6d79f202a4: "thermal: tegra: add thermtrip function" from
> Mar 29, 2016, leads to the following Smatch complaint:
>
> drivers/thermal/tegra/soctherm.c:226 thermtrip_program()
> warn: variable dereferenced before check 'dev' (see line 222)
>
> drivers/thermal/tegra/soctherm.c
> 221 {
> 222 struct tegra_soctherm *ts = dev_get_drvdata(dev);
> ^^^^^^^^^^^^^^^^^^^
> Dereference inside function.
>
> 223 int temp;
> 224 u32 r;
> 225
> 226 if (!dev || !sg)
> ^^^^
> Too late.
>
> 227 return -EINVAL;
> 228
>
> regards,
> dan carpenter
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-06 9:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-02 5:50 thermal: tegra: add thermtrip function Dan Carpenter
2016-04-06 9:01 ` Wei Ni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.