* [PATCH] nfc: nxp-nci: Add remove on IRQ error
@ 2026-07-07 14:23 Greg Kroah-Hartman
2026-07-07 17:10 ` Ian Ray
0 siblings, 1 reply; 2+ messages in thread
From: Greg Kroah-Hartman @ 2026-07-07 14:23 UTC (permalink / raw)
To: oe-linux-nfc
Cc: linux-kernel, Griffin Kroah-Hartman, David Heidelberg, Carl Lee,
Jakub Kicinski, Krzysztof Kozlowski, Ian Ray,
Uwe Kleine-König (The Capable Hub), Greg Kroah-Hartman
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nfc: nxp-nci: Add remove on IRQ error
2026-07-07 14:23 [PATCH] nfc: nxp-nci: Add remove on IRQ error Greg Kroah-Hartman
@ 2026-07-07 17:10 ` Ian Ray
0 siblings, 0 replies; 2+ messages in thread
From: Ian Ray @ 2026-07-07 17:10 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: oe-linux-nfc, linux-kernel, Griffin Kroah-Hartman,
David Heidelberg, Carl Lee, Jakub Kicinski, Krzysztof Kozlowski,
Uwe Kleine-König (The Capable Hub)
On Tue, Jul 07, 2026 at 04:23:27PM +0200, Greg Kroah-Hartman wrote:
> 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>
Nice improvement!
Reviewed-by: Ian Ray <ian.ray@gehealthcare.com>
> ---
> 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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-07 17:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-07 14:23 [PATCH] nfc: nxp-nci: Add remove on IRQ error Greg Kroah-Hartman
2026-07-07 17:10 ` Ian Ray
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox