From: Jean-Francois Moine Date: Thu, 26 Mar 2009 08:01:48 +0000 (-0300) Subject: V4L/DVB (11218): gspca - sq905: Update the frame pointer after adding the last packet. X-Git-Tag: firefly_0821_release~15196^2~76 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f6b8332b5e90a8d9c42f224e60900c7eae474388;p=firefly-linux-kernel-4.4.55.git V4L/DVB (11218): gspca - sq905: Update the frame pointer after adding the last packet. Signed-off-by: Jean-Francois Moine Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/gspca/sq905.c b/drivers/media/video/gspca/sq905.c index da60eea51e44..b1d377e495c2 100644 --- a/drivers/media/video/gspca/sq905.c +++ b/drivers/media/video/gspca/sq905.c @@ -270,13 +270,14 @@ static void sq905_dostream(struct work_struct *work) } frame = gspca_get_i_frame(gspca_dev); if (frame && !discarding) { - gspca_frame_add(gspca_dev, packet_type, + frame = gspca_frame_add(gspca_dev, packet_type, frame, data, data_len); /* If entire frame fits in one packet we still need to add a LAST_PACKET */ - if ((packet_type == FIRST_PACKET) && - (bytes_left == 0)) - gspca_frame_add(gspca_dev, LAST_PACKET, + if (packet_type == FIRST_PACKET && + bytes_left == 0) + frame = gspca_frame_add(gspca_dev, + LAST_PACKET, frame, data, 0); } else { discarding = 1;