From: sensoray-dev Date: Mon, 17 Nov 2014 22:50:36 +0000 (-0300) Subject: media: s2255drv: fix payload size for JPG, MJPEG X-Git-Tag: v3.17.7~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce7c82e8f8616f03120f8bed8e4f344b69fa6a47;p=thirdparty%2Fkernel%2Fstable.git media: s2255drv: fix payload size for JPG, MJPEG commit 1f391217ad8d7cd7b1e48e6e2abf49970cd91d18 upstream. length is the size of the buffer, not the payload. That's set using vb2_set_plane_payload(). Signed-off-by: Dean Anderson Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c index 2c901861034af..efcaa90529ba6 100644 --- a/drivers/media/usb/s2255/s2255drv.c +++ b/drivers/media/usb/s2255/s2255drv.c @@ -632,7 +632,7 @@ static void s2255_fillbuff(struct s2255_vc *vc, break; case V4L2_PIX_FMT_JPEG: case V4L2_PIX_FMT_MJPEG: - buf->vb.v4l2_buf.length = jpgsize; + vb2_set_plane_payload(&buf->vb, 0, jpgsize); memcpy(vbuf, tmpbuf, jpgsize); break; case V4L2_PIX_FMT_YUV422P: