[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1615360238-22508-1-git-send-email-jiapeng.chong@linux.alibaba.com>
Date: Wed, 10 Mar 2021 15:10:38 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: chris@...kel.net
Cc: jcmvbkbc@...il.com, linux-xtensa@...ux-xtensa.org,
linux-kernel@...r.kernel.org,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Subject: [PATCH] xtensa: fix warning comparing pointer to 0
Fix the following coccicheck warning:
./arch/xtensa/kernel/pci.c:79:17-18: WARNING comparing pointer to 0.
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
arch/xtensa/kernel/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c
index 3f32e27..62c900e 100644
--- a/arch/xtensa/kernel/pci.c
+++ b/arch/xtensa/kernel/pci.c
@@ -76,7 +76,7 @@ int pci_iobar_pfn(struct pci_dev *pdev, int bar, struct vm_area_struct *vma)
struct pci_controller *pci_ctrl = (struct pci_controller*) pdev->sysdata;
resource_size_t ioaddr = pci_resource_start(pdev, bar);
- if (pci_ctrl == 0)
+ if (!pci_ctrl)
return -EINVAL; /* should never happen */
/* Convert to an offset within this PCI controller */
--
1.8.3.1
Powered by blists - more mailing lists