lkml.org 
[lkml]   [2020]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] drivers/pcmcia: Fix error return code in electra_cf_probe()
Date
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
\
 
 \ /
  Last update: 2020-11-24 08:03    [W:0.054 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site