aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorStefan Ringel <stefan.ringel@arcor.de>2010-05-19 13:58:24 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-06-01 01:21:58 -0300
commit0f9bdbc2da442a78990579cabc1554446ed784a7 (patch)
treec5999f893006046b945a21a36a0471dacdaaefa6 /drivers/staging
parent2a15ac7ad625dc22885446016d730a451df1b7d4 (diff)
downloadkernel_samsung_tuna-0f9bdbc2da442a78990579cabc1554446ed784a7.zip
kernel_samsung_tuna-0f9bdbc2da442a78990579cabc1554446ed784a7.tar.gz
kernel_samsung_tuna-0f9bdbc2da442a78990579cabc1554446ed784a7.tar.bz2
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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c
index f2b7fe4..2adf3cc 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;