public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* bttv locking problem
@ 2009-11-29 16:00 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2009-11-29 16:00 UTC (permalink / raw)
  To: linux-media; +Cc: mchehab

Hello,

I did a smatch static checker run and found a double unlock in 
bttv-driver.c.
drivers/media/video/bt8xx/bttv-driver.c +3203 bttv_poll() error: double unlock '&fh->cap.vb_lock'
I would fix it myself, but I don't know if the poll_wait() is supposed
to be protected by mutex_unlock(&fh->cap.vb_lock) or not.

drivers/media/video/bt8xx/bttv-driver.c
  3192                  mutex_unlock(&fh->cap.vb_lock);
  3193                  buf = (struct bttv_buffer*)fh->cap.read_buf;
  3194          }
  3195
  3196          poll_wait(file, &buf->vb.done, wait);
  3197          if (buf->vb.state == VIDEOBUF_DONE ||
  3198              buf->vb.state == VIDEOBUF_ERROR)
  3199                  rc =  POLLIN|POLLRDNORM;
  3200          else
  3201                  rc = 0;
  3202  err:
  3203          mutex_unlock(&fh->cap.vb_lock);

regards,
dan carpenter

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

only message in thread, other threads:[~2009-11-29 16:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-29 16:00 bttv locking problem Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox