[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1524059842-22099-1-git-send-email-weiyongjun1@huawei.com>
Date: Wed, 18 Apr 2018 13:57:22 +0000
From: Wei Yongjun <weiyongjun1@...wei.com>
To: Greg Ungerer <gerg@...ux-m68k.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>
CC: Wei Yongjun <weiyongjun1@...wei.com>,
<linux-m68k@...ts.linux-m68k.org>, <linux-kernel@...r.kernel.org>,
<kernel-janitors@...r.kernel.org>
Subject: [PATCH -next] m68k: fix return value check in mcf_pci_init()
In case of error, the function ioremap() returns NULL pointer not
ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.
Fixes: bf114d773167 ("m68k: force use of __raw_read/__raw_write address to be iomem")
Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
---
arch/m68k/coldfire/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/m68k/coldfire/pci.c b/arch/m68k/coldfire/pci.c
index 9d6342c..a7c2332 100644
--- a/arch/m68k/coldfire/pci.c
+++ b/arch/m68k/coldfire/pci.c
@@ -218,7 +218,7 @@ static int __init mcf_pci_init(void)
/* Keep a virtual mapping to IO/config space active */
iospace = ioremap(PCI_IO_PA, PCI_IO_SIZE);
- if (IS_ERR(iospace))
+ if (!iospace)
return -ENODEV;
pr_info("Coldfire: PCI IO/config window mapped to 0x%p\n", iospace);
Powered by blists - more mailing lists