OSDN Git Service

[media] mt9v032: fix hblank calculation
authorPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 26 May 2014 13:55:51 +0000 (10:55 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 22 Jul 2014 03:50:34 +0000 (00:50 -0300)
commitf17bc3f4707eb87bdb80b895911c551cdd606fbd
treee7b6deb91d541db64f662213bc307da944a04f04
parente9b5872ce5959298233ca43d03860eef85f4634f
[media] mt9v032: fix hblank calculation

Since (min_row_time - crop->width) can be negative, we have to do a signed
comparison here. Otherwise max_t casts the negative value to unsigned int
and sets min_hblank to that invalid value.

Cc: stable@vger.kernel.org
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/i2c/mt9v032.c