diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-13 19:55:38 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 19:08:10 +0200 |
commit | e74153d44a57d9445fb1dfad7c3accbec6d4a873 (patch) | |
tree | f8fe30f6751860b7e28a0011f639128803442e9a /drivers/media | |
parent | V4L/DVB (7545): em28xx: Fix CodingStyle errors and most warnings introduced b... (diff) | |
download | linux-e74153d44a57d9445fb1dfad7c3accbec6d4a873.tar.xz linux-e74153d44a57d9445fb1dfad7c3accbec6d4a873.zip |
V4L/DVB (7547): em28xx: Fix a broken lock
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-video.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index c5593526a6e7..033ecb45256b 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c @@ -790,15 +790,12 @@ static int res_get(struct em28xx_fh *fh) if (fh->stream_on) return rc; - mutex_lock(&dev->lock); - if (dev->stream_on) - rc = -EINVAL; - else { - dev->stream_on = 1; - fh->stream_on = 1; - } + return -EINVAL; + mutex_lock(&dev->lock); + dev->stream_on = 1; + fh->stream_on = 1; mutex_unlock(&dev->lock); return rc; } |