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/pxamci.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/mci/pxamci.c') diff --git a/drivers/mci/pxamci.c b/drivers/mci/pxamci.c index 5ab88b8beb..6b14aba509 100644 --- a/drivers/mci/pxamci.c +++ b/drivers/mci/pxamci.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -339,6 +340,8 @@ static int pxamci_probe(struct device_d *dev) clk_enable(); host = xzalloc(sizeof(*host)); host->base = dev_request_mem_region(dev, 0); + if (IS_ERR(host->base)) + return PTR_ERR(host->base); host->mci.init = pxamci_init; host->mci.send_cmd = pxamci_request; -- cgit v1.2.3