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/dma | |
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/dma')
-rw-r--r-- | drivers/dma/apbh_dma.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c index 665d394086..cd218f4582 100644 --- a/drivers/dma/apbh_dma.c +++ b/drivers/dma/apbh_dma.c @@ -18,6 +18,7 @@ #include <dma/apbh-dma.h> #include <stmp-device.h> #include <linux/list.h> +#include <linux/err.h> #include <common.h> #include <driver.h> #include <malloc.h> @@ -597,8 +598,8 @@ static int apbh_dma_probe(struct device_d *dev) apbh_dma = apbh = xzalloc(sizeof(*apbh)); apbh->regs = dev_request_mem_region(dev, 0); - if (!apbh->regs) - return -EBUSY; + if (IS_ERR(apbh->regs)) + return PTR_ERR(apbh->regs); apbh->id = id; |