clk: vt8500: fix sign of possible PLL values
authorAndrzej Hajda <a.hajda@samsung.com>
Fri, 2 Oct 2015 04:49:53 +0000 (06:49 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Sat, 30 Jan 2016 00:43:58 +0000 (16:43 -0800)
commit090341b0a95d1f6d762915a75c13b393366f4ab3
tree2acd04488b4cdc85a9b38cbdc55ea48426efaf42
parent0b225e41e369a7e03411bb67988513302a10382f
clk: vt8500: fix sign of possible PLL values

With unsigned values underflow in loops can occur resulting in
theoretically infinite loops.

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: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk-vt8500.c