linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wei Li <liwei391@huawei.com>
To: Dominik Brodowski <linux@dominikbrodowski.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Olof Johansson <olof@lixom.net>
Cc: <linux-kernel@vger.kernel.org>, <guohanjun@huawei.com>
Subject: [PATCH] drivers/pcmcia: Fix error return code in electra_cf_probe()
Date: Tue, 24 Nov 2020 15:00:40 +0800	[thread overview]
Message-ID: <20201124070040.3583-1-liwei391@huawei.com> (raw)

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


             reply	other threads:[~2020-11-24  7:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24  7:00 Wei Li [this message]
2020-12-05  8:58 ` [PATCH] drivers/pcmcia: Fix error return code in electra_cf_probe() Dominik Brodowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201124070040.3583-1-liwei391@huawei.com \
    --to=liwei391@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=guohanjun@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=olof@lixom.net \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).