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

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.comSigned-off-by: default avatarJason Cooper <jason@lakedaemon.net>
parent ba3ec578
...@@ -424,9 +424,9 @@ static int __init armada_xp_pmsu_cpufreq_init(void) ...@@ -424,9 +424,9 @@ static int __init armada_xp_pmsu_cpufreq_init(void)
} }
clk = clk_get(cpu_dev, 0); clk = clk_get(cpu_dev, 0);
if (!clk) { if (IS_ERR(clk)) {
pr_err("Cannot get clock for CPU %d\n", cpu); pr_err("Cannot get clock for CPU %d\n", cpu);
return -ENODEV; return PTR_ERR(clk);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment