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:
5886188
)
powerpc/mpc5121: fix NULL test in mpc5121_clk_get utility function.
author
roel kluin
<roel.kluin@gmail.com>
Fri, 9 Jan 2009 22:49:04 +0000
(15:49 -0700)
committer
Grant Likely
<grant.likely@secretlab.ca>
Fri, 9 Jan 2009 22:49:04 +0000
(15:49 -0700)
strcmp on NULL results in a segmentation fault, also, remove the second,
redundant test on dev
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
arch/powerpc/platforms/512x/clock.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/powerpc/platforms/512x/clock.c
b/arch/powerpc/platforms/512x/clock.c
index f416014ee727b99813017554dd654e5495210053..1bcff94eb924b054575ac58aba4a6713c0a6d0f9 100644
(file)
--- a/
arch/powerpc/platforms/512x/clock.c
+++ b/
arch/powerpc/platforms/512x/clock.c
@@
-56,12
+56,12
@@
static struct clk *mpc5121_clk_get(struct device *dev, const char *id)
int dev_match = 0;
int id_match = 0;
- if (dev == NULL
&&
id == NULL)
+ if (dev == NULL
||
id == NULL)
return NULL;
mutex_lock(&clocks_mutex);
list_for_each_entry(p, &clocks, node) {
- if (dev
&& dev
== p->dev)
+ if (dev == p->dev)
dev_match++;
if (strcmp(id, p->name) == 0)
id_match++;