diff options
Diffstat (limited to 'drivers/media/video/gspca/pac7302.c')
-rw-r--r-- | drivers/media/video/gspca/pac7302.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/media/video/gspca/pac7302.c b/drivers/media/video/gspca/pac7302.c index 88cc03bb3f94..a66df07d7625 100644 --- a/drivers/media/video/gspca/pac7302.c +++ b/drivers/media/video/gspca/pac7302.c | |||
@@ -835,12 +835,6 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, | |||
835 | if (sof) { | 835 | if (sof) { |
836 | int n, lum_offset, footer_length; | 836 | int n, lum_offset, footer_length; |
837 | 837 | ||
838 | image = gspca_dev->image; | ||
839 | if (image == NULL) { | ||
840 | gspca_dev->last_packet_type = DISCARD_PACKET; | ||
841 | return; | ||
842 | } | ||
843 | |||
844 | /* 6 bytes after the FF D9 EOF marker a number of lumination | 838 | /* 6 bytes after the FF D9 EOF marker a number of lumination |
845 | bytes are send corresponding to different parts of the | 839 | bytes are send corresponding to different parts of the |
846 | image, the 14th and 15th byte after the EOF seem to | 840 | image, the 14th and 15th byte after the EOF seem to |
@@ -856,7 +850,9 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, | |||
856 | } else { | 850 | } else { |
857 | gspca_frame_add(gspca_dev, INTER_PACKET, data, n); | 851 | gspca_frame_add(gspca_dev, INTER_PACKET, data, n); |
858 | } | 852 | } |
859 | if (gspca_dev->last_packet_type != DISCARD_PACKET | 853 | |
854 | image = gspca_dev->image; | ||
855 | if (image != NULL | ||
860 | && image[gspca_dev->image_len - 2] == 0xff | 856 | && image[gspca_dev->image_len - 2] == 0xff |
861 | && image[gspca_dev->image_len - 1] == 0xd9) | 857 | && image[gspca_dev->image_len - 1] == 0xd9) |
862 | gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); | 858 | gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); |