V4L/DVB (6338): ivtv: fix incorrect EBUSY return
authorHans Verkuil <hverkuil@xs4all.nl>
Fri, 12 Oct 2007 09:18:30 +0000 (06:18 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 22 Oct 2007 14:01:44 +0000 (12:01 -0200)
Trying to open the radio when a capture is in progress will make it
impossible to open the radio again since the radio stream wasn't released.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/ivtv/ivtv-fileops.c

index 0e0605cc0bd3b3f8041d0af508fb77f9aacd9ce1..24fcbb88e52912df18425e3322b1c9b6231e631d 100644 (file)
@@ -892,6 +892,7 @@ static int ivtv_serialized_open(struct ivtv_stream *s, struct file *filp)
                        if (atomic_read(&itv->capturing) > 0) {
                                /* switching to radio while capture is
                                   in progress is not polite */
+                               ivtv_release_stream(s);
                                kfree(item);
                                return -EBUSY;
                        }