diff options
author | Wang ShaoBo <bobo.shaobowang@huawei.com> | 2020-11-25 20:50:57 +0800 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2020-12-05 09:59:13 +0100 |
commit | 70d3a462fc244b0580268cc8e6c47ae4463db68a (patch) | |
tree | f66f14684bee947683a47fad283e9bef95c0a74f /drivers/pcmcia | |
parent | ea2c5ac866c3439cb65771c33c53f273b68b5178 (diff) |
pcmcia: omap: Fix error return code in omap_cf_probe()
Fix to return proper error code instaed of 0 in omap_cf_probe(), as done
elsewhere in this function.
Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/omap_cf.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c index d3ef5534991e..f0b2c2d03469 100644 --- a/drivers/pcmcia/omap_cf.c +++ b/drivers/pcmcia/omap_cf.c @@ -252,11 +252,15 @@ static int __init omap_cf_probe(struct platform_device *pdev) /* pcmcia layer only remaps "real" memory */ cf->socket.io_offset = (unsigned long) ioremap(cf->phys_cf + SZ_4K, SZ_2K); - if (!cf->socket.io_offset) + if (!cf->socket.io_offset) { + status = -ENOMEM; goto fail1; + } - if (!request_mem_region(cf->phys_cf, SZ_8K, driver_name)) + if (!request_mem_region(cf->phys_cf, SZ_8K, driver_name)) { + status = -ENXIO; goto fail1; + } /* NOTE: CF conflicts with MMC1 */ omap_cfg_reg(W11_1610_CF_CD1); |