All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/pcmcia: Fix error return code in electra_cf_probe()
@ 2020-11-24  7:00 Wei Li
  2020-12-05  8:58 ` Dominik Brodowski
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Li @ 2020-11-24  7:00 UTC (permalink / raw)
  To: Dominik Brodowski, Andrew Morton, Peter Zijlstra (Intel), Olof Johansson
  Cc: linux-kernel, guohanjun

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")
Signed-off-by: Wei Li <liwei391@huawei.com>
---
 drivers/pcmcia/electra_cf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c
index 35158cfd9c1a..0570758e3fa8 100644
--- a/drivers/pcmcia/electra_cf.c
+++ b/drivers/pcmcia/electra_cf.c
@@ -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)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-05 10:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24  7:00 [PATCH] drivers/pcmcia: Fix error return code in electra_cf_probe() Wei Li
2020-12-05  8:58 ` 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.