[PATCH] powerpc/pci: fix warning comparing pointer to 0
Jiapeng Chong
jiapeng.chong at linux.alibaba.com
Mon Mar 15 18:35:24 AEDT 2021
Fix the following coccicheck warning:
./arch/powerpc/platforms/maple/pci.c:37:16-17: WARNING comparing pointer
to 0.
Reported-by: Abaci Robot <abaci at linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong at linux.alibaba.com>
---
arch/powerpc/platforms/maple/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index a20b957..37875e4 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -34,7 +34,7 @@
static int __init fixup_one_level_bus_range(struct device_node *node, int higher)
{
- for (; node != 0;node = node->sibling) {
+ for (; node; node = node->sibling) {
const int *bus_range;
const unsigned int *class_code;
int len;
--
1.8.3.1
More information about the Linuxppc-dev
mailing list