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

clk: prima2: fix return value check in sirfsoc_of_clk_init()

In case of error, the function clk_get() returns ERR_PTR()
not NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
[mturquette@linaro.org: added missing parenthesis to fix compile break]

authored by

Wei Yongjun and committed by
Mike Turquette
f15ea6cb 04981724

+1 -1
+1 -1
drivers/clk/clk-prima2.c
··· 1113 1113 1114 1114 for (i = pll1; i < maxclk; i++) { 1115 1115 prima2_clks[i] = clk_register(NULL, prima2_clk_hw_array[i]); 1116 - BUG_ON(!prima2_clks[i]); 1116 + BUG_ON(IS_ERR(prima2_clks[i])); 1117 1117 } 1118 1118 clk_register_clkdev(prima2_clks[cpu], NULL, "cpu"); 1119 1119 clk_register_clkdev(prima2_clks[io], NULL, "io");