From: Stefan Ringel Date: Wed, 19 May 2010 16:58:24 +0000 (-0300) Subject: V4L/DVB: tm6000: bugfix incorrect size X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0f9bdbc2da442a78990579cabc1554446ed784a7;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git V4L/DVB: tm6000: bugfix incorrect size Signed-off-by: Stefan Ringel Signed-off-by: Mauro Carvalho Chehab --- 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;