提交 b03e119f 编写于 作者: W Wei Yongjun 提交者: 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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Link: https://lkml.kernel.org/r/1406038688-26417-1-git-send-email-weiyj_lk@163.comSigned-off-by: NJason Cooper <jason@lakedaemon.net>
上级 ba3ec578
......@@ -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);
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册