diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-07-31 10:38:08 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-09-16 08:32:10 +0200 |
commit | ed6e965824303255cacc1c1a195d3684caa26bce (patch) | |
tree | 26e2b1b78498675ceae4dd2e990836c26ec1d5ec /drivers/mci/pxamci.c | |
parent | 5bdc82c54a3306f2ae151a00f2df54f9240395b8 (diff) | |
download | barebox-ed6e965824303255cacc1c1a195d3684caa26bce.tar.gz barebox-ed6e965824303255cacc1c1a195d3684caa26bce.tar.xz |
resource: Let dev_request_mem_region return an error pointer
For all users fix or add the error check.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mci/pxamci.c')
-rw-r--r-- | drivers/mci/pxamci.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 <clock.h> #include <init.h> #include <mci.h> +#include <linux/err.h> #include <mach/clock.h> #include <mach/mci_pxa2xx.h> @@ -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; |