aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-video.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index d6ada6226b5..d3485f500c5 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -947,6 +947,12 @@ static int vidioc_s_fmt_cap(struct file *file, void *priv,
947 goto out; 947 goto out;
948 } 948 }
949 949
950 if (dev->stream_on && !fh->stream_on) {
951 em28xx_errdev("%s device in use by another fh\n", __func__);
952 rc = -EBUSY;
953 goto out;
954 }
955
950 /* set new image size */ 956 /* set new image size */
951 dev->width = f->fmt.pix.width; 957 dev->width = f->fmt.pix.width;
952 dev->height = f->fmt.pix.height; 958 dev->height = f->fmt.pix.height;