public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: hans.verkuil@cisco.com
Cc: linux-media@vger.kernel.org
Subject: re: [media] s2255drv: remove V4L2_FL_LOCK_ALL_FOPS
Date: Mon, 13 Aug 2012 18:23:06 +0300	[thread overview]
Message-ID: <20120813152306.GA12021@elgon.mountain> (raw)

Hello Hans Verkuil,

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

The patch 0e1f0edfdd25: "[media] s2255drv: remove 
V4L2_FL_LOCK_ALL_FOPS" from Jun 24, 2012, leads to the following 
Smatch complaint:

drivers/media/video/s2255drv.c:1867 s2255_mmap_v4l()
	 warn: variable dereferenced before check 'fh' (see line 1864)

drivers/media/video/s2255drv.c
  1863		struct s2255_fh *fh = file->private_data;
  1864		struct s2255_dev *dev = fh->dev;
                                        ^^^^^^^
New dereference.

  1865		int ret;
  1866	
  1867		if (!fh)
                    ^^^
Old check.

  1868			return -ENODEV;
  1869		dprintk(4, "%s, vma=0x%08lx\n", __func__, (unsigned long)vma);

regards,
dan carpenter


                 reply	other threads:[~2012-08-13 15:23 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=20120813152306.GA12021@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-media@vger.kernel.org \
    /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