From: Jean-Francois Moine Date: Fri, 19 Dec 2008 18:17:25 +0000 (-0300) Subject: V4L/DVB (9991): gspca - main: Check if a buffer has been queued on streamon. X-Git-Tag: MMI-PSA29.97-13-9~30449^2~118 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1edabe71277a394b306fcb9a28a1977f345c8a20;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git V4L/DVB (9991): gspca - main: Check if a buffer has been queued on streamon. Signed-off-by: Jean-Francois Moine Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 66f60e38eece..edb667028dfe 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -1226,7 +1226,8 @@ static int vidioc_streamon(struct file *file, void *priv, ret = -ENODEV; goto out; } - if (gspca_dev->nframes == 0) { + if (gspca_dev->nframes == 0 + || !(gspca_dev->frame[0].v4l2_buf.flags & V4L2_BUF_FLAG_QUEUED)) { ret = -EINVAL; goto out; }