summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/files/arch/mips
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-03-18 19:19:19 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-03-18 19:19:19 +0000
commit18aa68d3683a31dd8528c5baa1758fc91d379bf2 (patch)
tree466228bcdce5989bad05adb074727a5735a849dd /target/linux/ar71xx/files/arch/mips
parent73f7a1c224f037ba0cbca1dcf71d56de7e25a731 (diff)
downloadmtk-20170518-18aa68d3683a31dd8528c5baa1758fc91d379bf2.zip
mtk-20170518-18aa68d3683a31dd8528c5baa1758fc91d379bf2.tar.gz
mtk-20170518-18aa68d3683a31dd8528c5baa1758fc91d379bf2.tar.bz2
ar71xx: check returned value of ioremap in ar71xx_pcibios_setup
SVN-Revision: 20288
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips')
-rw-r--r--target/linux/ar71xx/files/arch/mips/pci/pci-ar71xx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/pci/pci-ar71xx.c b/target/linux/ar71xx/files/arch/mips/pci/pci-ar71xx.c
index 88eb917..7d0eee9 100644
--- a/target/linux/ar71xx/files/arch/mips/pci/pci-ar71xx.c
+++ b/target/linux/ar71xx/files/arch/mips/pci/pci-ar71xx.c
@@ -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);