Skip to contentSkip to conversation

pcmcia: omap: Fix error return code in omap_cf_probe()

PATCH Applied Wang ShaoBo 2 participants 2 messages Nov 25, 2020 – Dec 5, 2020 Pcmcia

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/pcmcia/omap_cf.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/pcmcia/omap_cf.c +6 -2
index d3ef5534991e..f0b2c2d03469 100644
@@ -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);
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw

Am Wed, Nov 25, 2020 at 08:50:57PM +0800 schrieb Wang ShaoBo:

Quoted 4 lines

Fix to return proper error code instaed of 0 in omap_cf_probe(), as done elsewhere in this function.

Applied to pcmcia-next.

Thanks,
Dominik