* [PATCH] pcmcia: omap: Fix error return code in omap_cf_probe()
@ 2020-11-25 12:50 Wang ShaoBo
2020-12-05 9:00 ` Dominik Brodowski
0 siblings, 1 reply; 2+ messages in thread
From: Wang ShaoBo @ 2020-11-25 12:50 UTC (permalink / raw)
To: linux; +Cc: clabbe, linux-kernel, huawei.libin, cj.chengjian, bobo.shaobowang
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>
---
drivers/pcmcia/omap_cf.c | 8 ++++++--
1 file 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);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pcmcia: omap: Fix error return code in omap_cf_probe()
2020-11-25 12:50 [PATCH] pcmcia: omap: Fix error return code in omap_cf_probe() Wang ShaoBo
@ 2020-12-05 9:00 ` Dominik Brodowski
0 siblings, 0 replies; 2+ messages in thread
From: Dominik Brodowski @ 2020-12-05 9:00 UTC (permalink / raw)
To: Wang ShaoBo; +Cc: clabbe, linux-kernel, huawei.libin, cj.chengjian
Am Wed, Nov 25, 2020 at 08:50:57PM +0800 schrieb Wang ShaoBo:
> 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>
Applied to pcmcia-next.
Thanks,
Dominik
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-05 9:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 12:50 [PATCH] pcmcia: omap: Fix error return code in omap_cf_probe() Wang ShaoBo
2020-12-05 9:00 ` Dominik Brodowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.