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/dma/apbh_dma.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/dma') 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 #include #include +#include #include #include #include @@ -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; -- cgit v1.2.3