Commit b03e119f authored by Wei Yongjun's avatar Wei Yongjun Committed by Jason Cooper
Browse files

ARM: mvebu: fix return value check in armada_xp_pmsu_cpufreq_init()



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

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Link: https://lkml.kernel.org/r/1406038688-26417-1-git-send-email-weiyj_lk@163.com


Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
parent ba3ec578
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -424,9 +424,9 @@ static int __init armada_xp_pmsu_cpufreq_init(void)
		}

		clk = clk_get(cpu_dev, 0);
		if (!clk) {
		if (IS_ERR(clk)) {
			pr_err("Cannot get clock for CPU %d\n", cpu);
			return -ENODEV;
			return PTR_ERR(clk);
		}

		/*