diff options
Diffstat (limited to 'drivers/media/video/gspca/pac7311.c')
-rw-r--r-- | drivers/media/video/gspca/pac7311.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c index 5568c41a296c..1cb7e99e92bd 100644 --- a/drivers/media/video/gspca/pac7311.c +++ b/drivers/media/video/gspca/pac7311.c | |||
@@ -630,12 +630,6 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, | |||
630 | if (sof) { | 630 | if (sof) { |
631 | int n, lum_offset, footer_length; | 631 | int n, lum_offset, footer_length; |
632 | 632 | ||
633 | image = gspca_dev->image; | ||
634 | if (image == NULL) { | ||
635 | gspca_dev->last_packet_type = DISCARD_PACKET; | ||
636 | return; | ||
637 | } | ||
638 | |||
639 | /* 6 bytes after the FF D9 EOF marker a number of lumination | 633 | /* 6 bytes after the FF D9 EOF marker a number of lumination |
640 | bytes are send corresponding to different parts of the | 634 | bytes are send corresponding to different parts of the |
641 | image, the 14th and 15th byte after the EOF seem to | 635 | image, the 14th and 15th byte after the EOF seem to |
@@ -651,7 +645,8 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, | |||
651 | } else { | 645 | } else { |
652 | gspca_frame_add(gspca_dev, INTER_PACKET, data, n); | 646 | gspca_frame_add(gspca_dev, INTER_PACKET, data, n); |
653 | } | 647 | } |
654 | if (gspca_dev->last_packet_type != DISCARD_PACKET | 648 | image = gspca_dev->image; |
649 | if (image != NULL | ||
655 | && image[gspca_dev->image_len - 2] == 0xff | 650 | && image[gspca_dev->image_len - 2] == 0xff |
656 | && image[gspca_dev->image_len - 1] == 0xd9) | 651 | && image[gspca_dev->image_len - 1] == 0xd9) |
657 | gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); | 652 | gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); |