diff options
-rw-r--r-- | drivers/media/video/gspca/pac7311.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c index caa33292a08a..96cd7f644adf 100644 --- a/drivers/media/video/gspca/pac7311.c +++ b/drivers/media/video/gspca/pac7311.c | |||
@@ -610,13 +610,14 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, | |||
610 | continue; | 610 | continue; |
611 | switch (data[i + 1]) { | 611 | switch (data[i + 1]) { |
612 | case 0xd9: /* end of frame */ | 612 | case 0xd9: /* end of frame */ |
613 | i += 2; | ||
613 | frame = gspca_frame_add(gspca_dev, | 614 | frame = gspca_frame_add(gspca_dev, |
614 | LAST_PACKET, | 615 | LAST_PACKET, |
615 | frame, data, i + 1); | 616 | frame, data, i); |
616 | data += INTER_FRAME; | 617 | data += i + INTER_FRAME; |
617 | len -= INTER_FRAME; | 618 | len -= i + INTER_FRAME; |
618 | i = 0; | 619 | i = 0; |
619 | if (len > LUM_OFFSET) | 620 | if (len > -LUM_OFFSET) |
620 | sd->lum_sum += data[-LUM_OFFSET]; | 621 | sd->lum_sum += data[-LUM_OFFSET]; |
621 | if (len < 0) { | 622 | if (len < 0) { |
622 | sd->tosof = -len; | 623 | sd->tosof = -len; |