From ed6e965824303255cacc1c1a195d3684caa26bce Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 31 Jul 2014 10:38:08 +0200 Subject: resource: Let dev_request_mem_region return an error pointer For all users fix or add the error check. Signed-off-by: Sascha Hauer --- drivers/mci/atmel_mci.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/mci/atmel_mci.c') diff --git a/drivers/mci/atmel_mci.c b/drivers/mci/atmel_mci.c index 36107a6ef8..63d2475da7 100644 --- a/drivers/mci/atmel_mci.c +++ b/drivers/mci/atmel_mci.c @@ -572,6 +572,8 @@ static int atmci_probe(struct device_d *hw_dev) host->slot_b = pd->slot_b; host->regs = dev_request_mem_region(hw_dev, 0); + if (IS_ERR(host->regs)) + return PTR_ERR(host->regs); host->hw_dev = hw_dev; hw_dev->priv = host; host->clk = clk_get(hw_dev, "mci_clk"); -- cgit v1.2.3