Message ID | 49C1EBBB.1080109@freemail.hu (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
--- linux-2.6.29-rc8/drivers/media/video/gspca/gspca.c.orig 2009-03-14 12:29:38.000000000 +0100 +++ linux-2.6.29-rc8/drivers/media/video/gspca/gspca.c 2009-03-19 07:14:40.000000000 +0100 @@ -1319,9 +1319,14 @@ static int vidioc_g_parm(struct file *fi struct v4l2_streamparm *parm) { struct gspca_dev *gspca_dev = priv; + enum v4l2_buf_type type; + if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) + return -EINVAL; + + type = parm->type; memset(parm, 0, sizeof *parm); - parm->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + parm->type = type; parm->parm.capture.readbuffers = gspca_dev->nbufread; if (gspca_dev->sd_desc->get_streamparm) {