[PATCH 01/11] ARM: i.MX: iim: Check result of dev_request_mem_region

Sascha Hauer s.hauer at pengutronix.de
Fri May 16 03:30:48 PDT 2014


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/mach-imx/iim.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-imx/iim.c b/arch/arm/mach-imx/iim.c
index dccaaa9..8e37cd7 100644
--- a/arch/arm/mach-imx/iim.c
+++ b/arch/arm/mach-imx/iim.c
@@ -277,6 +277,8 @@ static int imx_iim_probe(struct device_d *dev)
 	void __iomem *base;
 
 	base = dev_request_mem_region(dev, 0);
+	if (!base)
+		return -EBUSY;
 
 	for (i = 0; i < 8; i++) {
 		imx_iim_add_bank(dev, base, i);
-- 
2.0.0.rc0




More information about the barebox mailing list