Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Claudiu Beznea <claudiu.beznea@microchip.com>
To: <ajay.kathat@microchip.com>, <kvalo@codeaurora.org>,
	<davem@davemloft.net>, <kuba@kernel.org>
Cc: <linux-wireless@vger.kernel.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Claudiu Beznea <claudiu.beznea@microchip.com>
Subject: [PATCH 2/3] wilc1000: dipose irq on failure path
Date: Fri, 6 Aug 2021 11:12:28 +0300	[thread overview]
Message-ID: <20210806081229.721731-3-claudiu.beznea@microchip.com> (raw)
In-Reply-To: <20210806081229.721731-1-claudiu.beznea@microchip.com>

Dispose IRQ on failure path.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/net/wireless/microchip/wilc1000/sdio.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/microchip/wilc1000/sdio.c b/drivers/net/wireless/microchip/wilc1000/sdio.c
index d11f245542e7..d1fd182bbbff 100644
--- a/drivers/net/wireless/microchip/wilc1000/sdio.c
+++ b/drivers/net/wireless/microchip/wilc1000/sdio.c
@@ -149,14 +149,15 @@ static int wilc_sdio_probe(struct sdio_func *func,
 	wilc->rtc_clk = devm_clk_get(&func->card->dev, "rtc");
 	if (PTR_ERR_OR_ZERO(wilc->rtc_clk) == -EPROBE_DEFER) {
 		ret = -EPROBE_DEFER;
-		goto netdev_cleanup;
+		goto dispose_irq;
 	} else if (!IS_ERR(wilc->rtc_clk))
 		clk_prepare_enable(wilc->rtc_clk);
 
 	dev_info(&func->dev, "Driver Initializing success\n");
 	return 0;
 
-netdev_cleanup:
+dispose_irq:
+	irq_dispose_mapping(wilc->dev_irq_num);
 	wilc_netdev_cleanup(wilc);
 free:
 	kfree(sdio_priv);
-- 
2.25.1


  parent reply	other threads:[~2021-08-06  8:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06  8:12 [PATCH 0/3] wilc1000: minor cleanups Claudiu Beznea
2021-08-06  8:12 ` [PATCH 1/3] wilc1000: use goto labels on error path Claudiu Beznea
2021-08-21 17:46   ` Kalle Valo
2021-08-06  8:12 ` Claudiu Beznea [this message]
2021-08-06  8:12 ` [PATCH 3/3] wilc1000: use devm_clk_get_optional() Claudiu Beznea

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=20210806081229.721731-3-claudiu.beznea@microchip.com \
    --to=claudiu.beznea@microchip.com \
    --cc=ajay.kathat@microchip.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.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).