mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 04:34:08 +08:00
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: Wei 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: Jason Cooper <jason@lakedaemon.net>
This commit is contained in:
parent
ba3ec5780b
commit
b03e119fff
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user