Skip to contentSkip to conversation

drivers/pcmcia: Fix error return code in electra_cf_probe()

PATCH In review Wei Li 2 participants 2 messages Nov 24, 2020 – Dec 5, 2020 Pcmcia

lore
Share & tools
lore

Wei Li

author
#0 lore raw

PATCH 1/1 drivers/pcmcia: Fix error return code in electra_cf_probe()

When it fails to call of_get_property(), it just jumps to 'fail1', while the 'status' which will be returned is not updated.

Fixes 2b571a066a2f ("pcmcia: CompactFlash driver for PA Semi Electra boards")
---
 drivers/pcmcia/electra_cf.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pcmcia/electra_cf.c +1 -0
index 35158cfd9c1a..0570758e3fa8 100644
@@ -228,6 +228,7 @@ static int electra_cf_probe(struct platform_device *ofdev)
 	}
 
 	cf->socket.pci_irq = cf->irq;
+	status = -ENODEV;
 
 	prop = of_get_property(np, "card-detect-gpio", NULL);
 	if (!prop)
Signature · 1 line
2.17.1
#1 lore raw

Am Tue, Nov 24, 2020 at 03:00:40PM +0800 schrieb Wei Li:

Quoted 5 lines

When it fails to call of_get_property(), it just jumps to 'fail1', while the 'status' which will be returned is not updated.

Fixes 2b571a066a2f ("pcmcia: CompactFlash driver for PA Semi Electra boards")

Thnaks for the patch. However, this issue is already fixed by
commit f15480e947d4 ("pcmcia/electra_cf: Fix some return values in 'electra_cf_probe()' in case of error")
in pcmcia-next.

Thanks,
Dominik