All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: crope@iki.fi
Cc: linux-media@vger.kernel.org
Subject: re: msi2500: move msi3101 out of staging and rename
Date: Fri, 25 Jul 2014 15:21:52 +0300	[thread overview]
Message-ID: <20140725122152.GD528@mwanda> (raw)

Hello Antti Palosaari,

The patch fd8b5f502929: "msi2500: move msi3101 out of staging and
rename" from Jul 13, 2014, leads to the following static checker
warning:

drivers/media/usb/msi2500/msi2500.c:887 msi2500_stop_streaming()
	 error: we previously assumed 's->udev' could be null (see line 880)

drivers/media/usb/msi2500/msi2500.c
   872  static void msi2500_stop_streaming(struct vb2_queue *vq)
   873  {
   874          struct msi2500_state *s = vb2_get_drv_priv(vq);
   875  
   876          dev_dbg(&s->udev->dev, "%s:\n", __func__);
   877  
   878          mutex_lock(&s->v4l2_lock);
   879  
   880          if (s->udev)
                    ^^^^^^^
Check.

   881                  msi2500_isoc_cleanup(s);
   882  
   883          msi2500_cleanup_queued_bufs(s);
   884  
   885          /* according to tests, at least 700us delay is required  */
   886          msleep(20);
   887          if (!msi2500_ctrl_msg(s, CMD_STOP_STREAMING, 0)) {
                     ^^^^^^^^^^^^^^^^^^
Unchecked dereference if you have debugging enabled.

   888                  /* sleep USB IF / ADC */
   889                  msi2500_ctrl_msg(s, CMD_WREG, 0x01000003);
   890          }

regards,
dan carpenter

                 reply	other threads:[~2014-07-25 12:22 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=20140725122152.GD528@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=crope@iki.fi \
    --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 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.