diff options
Diffstat (limited to 'drivers/media/video/gspca/ov519.c')
-rw-r--r-- | drivers/media/video/gspca/ov519.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index 2e7df66a84b9..2b2cbdbf03fe 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c | |||
@@ -4162,7 +4162,6 @@ static void ovfx2_pkt_scan(struct gspca_dev *gspca_dev, | |||
4162 | int len) /* iso packet length */ | 4162 | int len) /* iso packet length */ |
4163 | { | 4163 | { |
4164 | struct sd *sd = (struct sd *) gspca_dev; | 4164 | struct sd *sd = (struct sd *) gspca_dev; |
4165 | struct gspca_frame *frame; | ||
4166 | 4165 | ||
4167 | gspca_frame_add(gspca_dev, INTER_PACKET, data, len); | 4166 | gspca_frame_add(gspca_dev, INTER_PACKET, data, len); |
4168 | 4167 | ||
@@ -4172,9 +4171,8 @@ static void ovfx2_pkt_scan(struct gspca_dev *gspca_dev, | |||
4172 | the sensor and bridge are still syncing, so drop it. */ | 4171 | the sensor and bridge are still syncing, so drop it. */ |
4173 | if (sd->first_frame) { | 4172 | if (sd->first_frame) { |
4174 | sd->first_frame--; | 4173 | sd->first_frame--; |
4175 | frame = gspca_get_i_frame(gspca_dev); | 4174 | if (gspca_dev->image_len < |
4176 | if (!frame || (frame->data_end - frame->data) < | 4175 | sd->gspca_dev.width * sd->gspca_dev.height) |
4177 | (sd->gspca_dev.width * sd->gspca_dev.height)) | ||
4178 | gspca_dev->last_packet_type = DISCARD_PACKET; | 4176 | gspca_dev->last_packet_type = DISCARD_PACKET; |
4179 | } | 4177 | } |
4180 | gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); | 4178 | gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); |