ar71xx: check returned value of ioremap in ar71xx_pcibios_setup
authorGabor Juhos <juhosg@openwrt.org>
Thu, 18 Mar 2010 19:19:19 +0000 (19:19 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Thu, 18 Mar 2010 19:19:19 +0000 (19:19 +0000)
SVN-Revision: 20288

target/linux/ar71xx/files/arch/mips/pci/pci-ar71xx.c

index 88eb917a5bb832dd704bc20709a61190d4d80ec0..7d0eee9dbfb365a5c0bbf0c11a173bb84cf5a10f 100644 (file)
@@ -384,6 +384,8 @@ int __init ar71xx_pcibios_init(void)
 
        ar71xx_pcicfg_base = ioremap_nocache(AR71XX_PCI_CFG_BASE,
                                                AR71XX_PCI_CFG_SIZE);
+       if (ar71xx_pcicfg_base == NULL)
+               return -ENOMEM;
 
        __raw_writel(PCI_WIN0_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN0);
        __raw_writel(PCI_WIN1_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN1);