projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b69a084
)
arm: bcm235xx: clk_set_rate avoid possible NULL deref
author
xypron.glpk@gmx.de
<xypron.glpk@gmx.de>
Sun, 30 Jul 2017 18:22:47 +0000
(20:22 +0200)
committer
Tom Rini
<trini@konsulko.com>
Sun, 13 Aug 2017 19:17:27 +0000
(15:17 -0400)
It does not make sense first to dereference c and then
to check if it is NULL.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
arch/arm/cpu/armv7/bcm235xx/clk-core.c
patch
|
blob
|
history
diff --git
a/arch/arm/cpu/armv7/bcm235xx/clk-core.c
b/arch/arm/cpu/armv7/bcm235xx/clk-core.c
index ee4b34574a0dc2436d6a0c69ffe3058ca07d2da4..89e367be822797e1f55d6dae0e1eaa721ec78de2 100644
(file)
--- a/
arch/arm/cpu/armv7/bcm235xx/clk-core.c
+++ b/
arch/arm/cpu/armv7/bcm235xx/clk-core.c
@@
-493,9
+493,9
@@
int clk_set_rate(struct clk *c, unsigned long rate)
{
int ret;
- debug("%s: %s rate=%ld\n", __func__, c->name, rate);
if (!c || !c->ops || !c->ops->set_rate)
return -EINVAL;
+ debug("%s: %s rate=%ld\n", __func__, c->name, rate);
if (c->use_cnt)
return -EINVAL;