summaryrefslogtreecommitdiffstats
path: root/arch/xtensa
diff options
context:
space:
mode:
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>2021-03-10 15:10:38 +0800
committerMax Filippov <jcmvbkbc@gmail.com>2021-04-04 15:39:02 -0700
commit9aa44cd2c24e302df5da49193a7cc233a0f7ddf8 (patch)
tree9865454bc7410fe93d0faacd5a7ef9fa33ed37c8 /arch/xtensa
parent8a128bc32aba2a19feadc4973b3590db66440e4f (diff)
downloadlinux-9aa44cd2c24e302df5da49193a7cc233a0f7ddf8.tar.bz2
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@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Message-Id: <1615360238-22508-1-git-send-email-jiapeng.chong@linux.alibaba.com> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/kernel/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c
index 3f32e275997a..62c900e400d6 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 */