summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/maple
diff options
context:
space:
mode:
authorChen Zhou <chenzhou10@huawei.com>2020-01-21 09:31:53 +0800
committerMichael Ellerman <mpe@ellerman.id.au>2020-01-26 00:11:35 +1100
commit1e3531982ee70adf1880715a968d9c3365f321ed (patch)
tree604e33ae1077f90d071b0097bffb058003972d3c /arch/powerpc/platforms/maple
parentaff8c8242bc638ba57247ae1ec5f272ac3ed3b92 (diff)
downloadlinux-1e3531982ee70adf1880715a968d9c3365f321ed.tar.bz2
powerpc/maple: Fix comparing pointer to 0
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
Diffstat (limited to 'arch/powerpc/platforms/maple')
-rw-r--r--arch/powerpc/platforms/maple/setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c
index 9cd6f3e1000b..bd5f9b1bc1a1 100644
--- 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",