projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba3ec57
)
ARM: mvebu: fix return value check in armada_xp_pmsu_cpufreq_init()
author
Wei Yongjun
<yongjun_wei@trendmicro.com.cn>
Tue, 22 Jul 2014 14:18:08 +0000
(22:18 +0800)
committer
Jason Cooper
<jason@lakedaemon.net>
Wed, 23 Jul 2014 12:31:13 +0000
(12:31 +0000)
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>
arch/arm/mach-mvebu/pmsu.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/arm/mach-mvebu/pmsu.c
b/arch/arm/mach-mvebu/pmsu.c
index 0ca285fdd5695fc25aca9237af5ea0f8910a8e7e..0b617ae3ceb96cf956c19f36109e88c4acae0c1d 100644
(file)
--- a/
arch/arm/mach-mvebu/pmsu.c
+++ b/
arch/arm/mach-mvebu/pmsu.c
@@
-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)
;
}
/*