linux-kernel.vger.kernel.org archive mirror
 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

* Re: [PATCH] drivers/pcmcia: Fix error return code in electra_cf_probe()
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Dominik Brodowski @ 2020-12-05  8:58 UTC (permalink / raw)
  To: Wei Li
  Cc: Andrew Morton, Peter Zijlstra (Intel),
	Olof Johansson, linux-kernel, guohanjun

Am Tue, Nov 24, 2020 at 03:00:40PM +0800 schrieb Wei Li:
> 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>

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

^ permalink raw reply	[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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).