diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2015-09-21 15:33:48 +0200 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2015-10-30 17:13:47 +0100 |
commit | 9b6d0d33c848661c859ccee331b9d2c2ba74489b (patch) | |
tree | 1b8e7f42e4d7c8529ed0e14ccd86618c7e8c47de /drivers/gpu/ipu-v3 | |
parent | 3e8b2246c36f4a340febc97d140db5dd727bb3c6 (diff) | |
download | linux-9b6d0d33c848661c859ccee331b9d2c2ba74489b.tar.bz2 |
gpu: ipu-v3: fix div_ratio type
The variable can be negative.
The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].
[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/ipu-v3')
-rw-r--r-- | drivers/gpu/ipu-v3/ipu-csi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/ipu-v3/ipu-csi.c b/drivers/gpu/ipu-v3/ipu-csi.c index 3bdb7058fcca..06631ac61b04 100644 --- a/drivers/gpu/ipu-v3/ipu-csi.c +++ b/drivers/gpu/ipu-v3/ipu-csi.c @@ -202,7 +202,7 @@ static int ipu_csi_set_testgen_mclk(struct ipu_csi *csi, u32 pixel_clk, u32 ipu_clk) { u32 temp; - u32 div_ratio; + int div_ratio; div_ratio = (ipu_clk / pixel_clk) - 1; |