Fix a regression, introduced in the driver split, which made
the ov534 driver unusable.
Plus, the debug message should reflect that we discard also packets
beyond the expected frame size.
Signed-off-by: Antonio Ospite <[email protected]>
Signed-off-by: Jean-Francois Moine <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
frame = gspca_get_i_frame(gspca_dev);
if (frame == NULL)
goto discard;
- if (frame->data_end - frame->data !=
+ if (frame->data_end - frame->data + (len - 12) !=
gspca_dev->width * gspca_dev->height * 2) {
- PDEBUG(D_PACK, "short frame");
+ PDEBUG(D_PACK, "wrong sized frame");
goto discard;
}
gspca_frame_add(gspca_dev, LAST_PACKET,