From: Hans de Goede Date: Thu, 11 Dec 2008 08:02:18 +0000 (-0300) Subject: V4L/DVB (9878): gspca - vc032x: Fix frame overflow errors with vc0321. X-Git-Tag: MMI-PSA29.97-13-9~30449^2~198 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d473a002399ff8cd168012f831aca7691d5f5086;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git V4L/DVB (9878): gspca - vc032x: Fix frame overflow errors with vc0321. The vc0321 sends some additional data after sending the complete frame, we ignore this. Signed-off-by: Hans de Goede Signed-off-by: Jean-Francois Moine Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c index 8f553bfbac0b..4556348f96e9 100644 --- a/drivers/media/video/gspca/vc032x.c +++ b/drivers/media/video/gspca/vc032x.c @@ -2272,6 +2272,12 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, data, len); return; } + + /* The vc0321 sends some additional data after sending the complete + * frame, we ignore this. */ + if (sd->bridge == BRIDGE_VC0321 + && len > frame->v4l2_buf.length - (frame->data_end - frame->data)) + len = frame->v4l2_buf.length - (frame->data_end - frame->data); gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len); }