media: mt9v032: fix hblank calculation
authorPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 26 May 2014 13:55:51 +0000 (10:55 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Sep 2014 16:19:06 +0000 (09:19 -0700)
commit2d826fecb15e82fb0af51435458435cc8088c790
tree9876b815506eefef69f0a267e371b67a35f8afc0
parent45f5ff8b66765f19fbd34b6a0ef49047c3c4a0a5
media: mt9v032: fix hblank calculation

commit f17bc3f4707eb87bdb80b895911c551cdd606fbd upstream.

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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/i2c/mt9v032.c