projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aff8c82
)
powerpc/maple: Fix comparing pointer to 0
author
Chen Zhou
<chenzhou10@huawei.com>
Tue, 21 Jan 2020 01:31:53 +0000
(09:31 +0800)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Sat, 25 Jan 2020 13:11:35 +0000
(
00:11
+1100)
Fixes coccicheck warning:
arch/powerpc/platforms/maple/setup.c:232:15-16:
WARNING comparing pointer to 0
Compare pointer-typed values to NULL rather than 0.
Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link:
https://lore.kernel.org/r/20200121013153.9937-1-chenzhou10@huawei.com
arch/powerpc/platforms/maple/setup.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/platforms/maple/setup.c
b/arch/powerpc/platforms/maple/setup.c
index
9cd6f3e
..
bd5f9b1
100644
(file)
--- a/
arch/powerpc/platforms/maple/setup.c
+++ b/
arch/powerpc/platforms/maple/setup.c
@@
-232,7
+232,7
@@
static void __init maple_init_IRQ(void)
root = of_find_node_by_path("/");
naddr = of_n_addr_cells(root);
opprop = of_get_property(root, "platform-open-pic", &opplen);
- if (opprop
!= 0
) {
+ if (opprop) {
openpic_addr = of_read_number(opprop, naddr);
has_isus = (opplen > naddr);
printk(KERN_DEBUG "OpenPIC addr: %lx, has ISUs: %d\n",