Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: cdce925: Fix limit check

It is likely that instead of '1>64', 'q>64' was expected.

Moreover, according to datasheet,
http://www.ti.com/lit/ds/symlink/cdce925.pdf
SCAS847I - JULY 2007 - REVISED OCTOBER 2016
PLL settings limits are: 16 <= q <= 63
So change the upper limit check from 64 to 63.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

authored by

Christophe JAILLET and committed by
Stephen Boyd
5785271e 100edfe3

+1 -1
+1 -1
drivers/clk/clk-cdce925.c
··· 216 216 nn = n * BIT(p); 217 217 /* q = int(nn/m) */ 218 218 q = nn / m; 219 - if ((q < 16) || (1 > 64)) { 219 + if ((q < 16) || (q > 63)) { 220 220 pr_debug("%s invalid q=%d\n", __func__, q); 221 221 return -EINVAL; 222 222 }