diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-10-02 08:54:42 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-10-02 08:54:42 +0200 |
commit | fa93e4fb602389c5a5d6991a86cf93ae6e92d016 (patch) | |
tree | 570dc8a12e7410fb1f87ddb473ad5a5e64240846 /drivers/dma/apbh_dma.c | |
parent | 52a0febb3dbe06e233f04d5c670fd662b85c1d95 (diff) | |
parent | d5a82eb095def58f3a19127bb08ff96d799b63a5 (diff) | |
download | barebox-fa93e4fb602389c5a5d6991a86cf93ae6e92d016.tar.gz barebox-fa93e4fb602389c5a5d6991a86cf93ae6e92d016.tar.xz |
Merge branch 'for-next/resource-err-ptr'
Diffstat (limited to 'drivers/dma/apbh_dma.c')
-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; |