diff options
author | Stefan Ringel | 2010-05-19 18:58:24 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab | 2010-06-01 06:21:58 +0200 |
commit | 0f9bdbc2da442a78990579cabc1554446ed784a7 (patch) | |
tree | c5999f893006046b945a21a36a0471dacdaaefa6 /drivers/staging | |
parent | V4L/DVB: tm6000, reset I2C bus function (diff) | |
download | kernel-qcow2-linux-0f9bdbc2da442a78990579cabc1554446ed784a7.tar.gz kernel-qcow2-linux-0f9bdbc2da442a78990579cabc1554446ed784a7.tar.xz kernel-qcow2-linux-0f9bdbc2da442a78990579cabc1554446ed784a7.zip |
V4L/DVB: tm6000: bugfix incorrect size
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/tm6000/tm6000-video.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index f2b7fe4a3581..2adf3cc972d3 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -205,7 +205,11 @@ static int copy_packet(struct urb *urb, u32 header, u8 **ptr, u8 *endp, c = (header >> 24) & 0xff; /* split the header fields */ - size = (((header & 0x7e) << 1) -1) *4; + size = ((header & 0x7e) << 1); + + if (size > 0) + size -= 4; + block = (header >> 7) & 0xf; field = (header >> 11) & 0x1; line = (header >> 12) & 0x1ff; |