linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bug report] thermal: tegra: add hw-throttle function
@ 2016-10-13  9:35 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-10-13  9:35 UTC (permalink / raw)
  Cc: Wei Ni, linux-tegra-u79uwXL29TY76Z2rM5mHXA

Hello Wei Ni,

This is a semi-automatic email about new static checker warnings.

The patch ce0dbf04f685: "thermal: tegra: add hw-throttle function" 
from May 11, 2016, leads to the following Smatch complaint:

drivers/thermal/tegra/soctherm.c:486 throttrip_program()
	 warn: variable dereferenced before check 'dev' (see line 481)

drivers/thermal/tegra/soctherm.c
   480	{
   481		struct tegra_soctherm *ts = dev_get_drvdata(dev);
                                                            ^^^
Dereference inside function.

   482		int temp, cpu_throt, gpu_throt;
   483		unsigned int throt;
   484		u32 r, reg_off;
   485	
   486		if (!dev || !sg || !stc || !stc->init)
                     ^^^
Check is too late.

   487			return -EINVAL;
   488	

regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-10-13  9:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-13  9:35 [bug report] thermal: tegra: add hw-throttle function Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).