summaryrefslogtreecommitdiffstats
path: root/drivers/mci/s3c.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-07-31 10:38:08 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-09-16 08:32:10 +0200
commited6e965824303255cacc1c1a195d3684caa26bce (patch)
tree26e2b1b78498675ceae4dd2e990836c26ec1d5ec /drivers/mci/s3c.c
parent5bdc82c54a3306f2ae151a00f2df54f9240395b8 (diff)
downloadbarebox-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/s3c.c')
-rw-r--r--drivers/mci/s3c.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mci/s3c.c b/drivers/mci/s3c.c
index 773c84ad09..3afd61e491 100644
--- a/drivers/mci/s3c.c
+++ b/drivers/mci/s3c.c
@@ -36,6 +36,7 @@
#include <errno.h>
#include <clock.h>
#include <io.h>
+#include <linux/err.h>
#include <mach/s3c-mci.h>
#include <mach/s3c-generic.h>
#include <mach/s3c-iomap.h>
@@ -741,6 +742,9 @@ static int s3c_mci_probe(struct device_d *hw_dev)
hw_dev->priv = s3c_host;
s3c_host->base = dev_request_mem_region(hw_dev, 0);
+ if (IS_ERR(s3c_host->base))
+ return PTR_ERR(s3c_host->base);
+
s3c_host->host.hw_dev = hw_dev;
/* feed forward the platform specific values */