]> git.baikalelectronics.ru Git - kernel.git/commit
[media] em28xx: fix wrong data offset for non-interlaced mode in em28xx_copy_video
authorFrank Schaefer <fschaefer.oss@googlemail.com>
Thu, 8 Nov 2012 17:11:33 +0000 (14:11 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 22 Dec 2012 19:55:34 +0000 (17:55 -0200)
commit3b9bb18773a2d1a25f59f82317d662290581aff4
treed912f8c28c09895da71a1aa3e7afbb8c976a1e94
parent78b7204f4f466bb420397c8e54f3dff1f45ed25c
[media] em28xx: fix wrong data offset for non-interlaced mode in em28xx_copy_video

em28xx_copy_video uses a wrong offset for the target buffer
when copying the data from an USB isoc packet. This happens
only for the second and all following lines in the packet.
The reason why this bug doesn't cause image corruption with
my test device (SilverCrest Webcam 1.3 MPix) is, that this
device never sends any packets that cross the end of a line.
I don't know if all devices behave like this, so this patch
should be considered for stable.
With the upcoming patches to add support for USB bulk transfers,
em28xx_copy_video will be called once per URB, which will
always trigger this bug.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/em28xx/em28xx-video.c