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/ata/ahci.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/ata/ahci.c')
-rw-r--r-- | drivers/ata/ahci.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 810d9abef7..645e9b5b7e 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -28,6 +28,7 @@ #include <malloc.h> #include <scsi.h> #include <linux/ctype.h> +#include <linux/err.h> #include <disks.h> #include <asm/mmu.h> #include <ata_drive.h> @@ -654,6 +655,8 @@ static int ahci_probe(struct device_d *dev) ahci = xzalloc(sizeof(*ahci)); regs = dev_request_mem_region(dev, 0); + if (IS_ERR(regs)) + return PTR_ERR(regs); ahci->dev = dev; ahci->mmio_base = regs; |