From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: oe-linux-nfc@lists.linux.dev
Cc: linux-kernel@vger.kernel.org,
"Griffin Kroah-Hartman" <griffin@kroah.com>,
"David Heidelberg" <david@ixit.cz>, "Carl Lee" <carl.lee@amd.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski@oss.qualcomm.com>,
"Ian Ray" <ian.ray@gehealthcare.com>,
"Uwe Kleine-König (The Capable Hub)"
<u.kleine-koenig@baylibre.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Subject: [PATCH] nfc: nxp-nci: Add remove on IRQ error
Date: Tue, 7 Jul 2026 16:23:27 +0200 [thread overview]
Message-ID: <2026070726-observer-fang-9716@gregkh> (raw)
From: Griffin Kroah-Hartman <griffin@kroah.com>
Add a call to nxp_nci_remove() in nxp_nci_i2c_probe() when the
request_threaded_irq() fails.
Previously, IRQ resources were not being freed upon error.
Assisted-by: gkh_clanker_2000
Cc: David Heidelberg <david@ixit.cz>
Cc: Carl Lee <carl.lee@amd.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Cc: Ian Ray <ian.ray@gehealthcare.com>
Cc: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
Signed-off-by: Griffin Kroah-Hartman <griffin@kroah.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/nfc/nxp-nci/i2c.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c
index faebc89a7ef5..564f38735510 100644
--- a/drivers/nfc/nxp-nci/i2c.c
+++ b/drivers/nfc/nxp-nci/i2c.c
@@ -334,8 +334,10 @@ static int nxp_nci_i2c_probe(struct i2c_client *client)
nxp_nci_i2c_irq_thread_fn,
irqflags | IRQF_ONESHOT,
NXP_NCI_I2C_DRIVER_NAME, phy);
- if (r < 0)
+ if (r < 0) {
nfc_err(&client->dev, "Unable to register IRQ handler\n");
+ nxp_nci_remove(phy->ndev);
+ }
return r;
}
--
2.55.0
next reply other threads:[~2026-07-07 14:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 14:23 Greg Kroah-Hartman [this message]
2026-07-07 17:10 ` [PATCH] nfc: nxp-nci: Add remove on IRQ error Ian Ray
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=2026070726-observer-fang-9716@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=carl.lee@amd.com \
--cc=david@ixit.cz \
--cc=griffin@kroah.com \
--cc=ian.ray@gehealthcare.com \
--cc=krzysztof.kozlowski@oss.qualcomm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-linux-nfc@lists.linux.dev \
--cc=u.kleine-koenig@baylibre.com \
/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 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.