[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200121013153.9937-1-chenzhou10@huawei.com>
Date: Tue, 21 Jan 2020 09:31:53 +0800
From: Chen Zhou <chenzhou10@...wei.com>
To: <benh@...nel.crashing.org>, <paulus@...ba.org>,
<mpe@...erman.id.au>
CC: <gregkh@...uxfoundation.org>, <nivedita@...m.mit.edu>,
<tglx@...utronix.de>, <allison@...utok.net>,
<linuxppc-dev@...ts.ozlabs.org>, <linux-kernel@...r.kernel.org>,
<chenzhou10@...wei.com>
Subject: [PATCH -next] 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@...wei.com>
---
arch/powerpc/platforms/maple/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c
index 47f7310..00a0780 100644
--- a/arch/powerpc/platforms/maple/setup.c
+++ b/arch/powerpc/platforms/maple/setup.c
@@ -229,7 +229,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",
--
2.7.4
Powered by blists - more mailing lists