diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-13 13:55:38 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:08:10 -0400 |
commit | e74153d44a57d9445fb1dfad7c3accbec6d4a873 (patch) | |
tree | f8fe30f6751860b7e28a0011f639128803442e9a /drivers/media/video/em28xx/em28xx-video.c | |
parent | f245e549f0d1fb43fd6d7759d31cd763e6d914b6 (diff) |
V4L/DVB (7547): em28xx: Fix a broken lock
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-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) | |||
790 | if (fh->stream_on) | 790 | if (fh->stream_on) |
791 | return rc; | 791 | return rc; |
792 | 792 | ||
793 | mutex_lock(&dev->lock); | ||
794 | |||
795 | if (dev->stream_on) | 793 | if (dev->stream_on) |
796 | rc = -EINVAL; | 794 | return -EINVAL; |
797 | else { | ||
798 | dev->stream_on = 1; | ||
799 | fh->stream_on = 1; | ||
800 | } | ||
801 | 795 | ||
796 | mutex_lock(&dev->lock); | ||
797 | dev->stream_on = 1; | ||
798 | fh->stream_on = 1; | ||
802 | mutex_unlock(&dev->lock); | 799 | mutex_unlock(&dev->lock); |
803 | return rc; | 800 | return rc; |
804 | } | 801 | } |