Commit 9aa44cd2 authored by Jiapeng Chong's avatar Jiapeng Chong Committed by Max Filippov

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: default avatarAbaci Robot <abaci@linux.alibaba.com>
Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Message-Id: <1615360238-22508-1-git-send-email-jiapeng.chong@linux.alibaba.com>
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
parent 8a128bc3
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment