linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@intel.com>
To: Patrick Boettcher <pboettcher@dibcom.fr>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>,
	kernel-janitors@vger.kernel.org,
	linux-media <linux-media@vger.kernel.org>
Subject: drivers/media/dvb/frontends/dib8000.c:1837 dib8000_tune() warn: variable dereferenced before check 'state' (see line 1834)
Date: Sun, 7 Oct 2012 17:38:12 +0800	[thread overview]
Message-ID: <20121007093812.GA9317@localhost> (raw)

Hi Patrick,

FYI, the below commit triggered a smatch warning:

77e2c0f V4L/DVB (12900): DiB8000: added support for DiBcom ISDB-T/ISDB-Tsb demodulator DiB8000

+ drivers/media/dvb/frontends/dib8000.c:1837 dib8000_tune() warn: variable dereferenced before check 'state' (see line 1834)

vim +1837 drivers/media/dvb/frontends/dib8000.c

77e2c0f5 Patrick Boettcher 2009-08-17  1830  static int dib8000_tune(struct dvb_frontend *fe)
77e2c0f5 Patrick Boettcher 2009-08-17  1831  {
77e2c0f5 Patrick Boettcher 2009-08-17  1832  	struct dib8000_state *state = fe->demodulator_priv;
77e2c0f5 Patrick Boettcher 2009-08-17  1833  	int ret = 0;
77e2c0f5 Patrick Boettcher 2009-08-17  1834  	u16 value, mode = fft_to_mode(state);
77e2c0f5 Patrick Boettcher 2009-08-17  1835  
77e2c0f5 Patrick Boettcher 2009-08-17  1836  	// we are already tuned - just resuming from suspend
77e2c0f5 Patrick Boettcher 2009-08-17 @1837  	if (state == NULL)
77e2c0f5 Patrick Boettcher 2009-08-17  1838  		return -EINVAL;
77e2c0f5 Patrick Boettcher 2009-08-17  1839  

---
0-DAY kernel build testing backend         Open Source Technology Center
Fengguang Wu, Yuanhan Liu                              Intel Corporation

                 reply	other threads:[~2012-10-07  9:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121007093812.GA9317@localhost \
    --to=fengguang.wu@intel.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=pboettcher@dibcom.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).