nfc: nxp-nci: Add remove on IRQ error
Subsystems (2)
PATCH 1/1 nfc: nxp-nci: Add remove on IRQ error
From: Griffin Kroah-Hartman <[email protected]>
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 <[email protected]>
Cc Carl Lee <[email protected]>
Cc Jakub Kicinski <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Ian Ray <[email protected]>
Cc "Uwe Kleine-König (The Capable Hub)" <[email protected]>
Signed-off-by Griffin Kroah-Hartman <[email protected]>
Signed-off-by Greg Kroah-Hartman <[email protected]>
--- drivers/nfc/nxp-nci/i2c.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/nfc/nxp-nci/i2c.c +3 -1
@@ -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; }
Signature · 1 line
2.55.0
Quoted 6 lines · Greg Kroah-Hartman
From: Griffin Kroah-Hartman <[email protected]>
Add a call to
nxp_nci_remove()innxp_nci_i2c_probe()when therequest_threaded_irq()fails.
Previously, IRQ resources were not being freed upon error.
Quoted 9 lines
Assisted-by gkh_clanker_2000Cc David Heidelberg <[email protected]>Cc Carl Lee <[email protected]>Cc Jakub Kicinski <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Ian Ray <[email protected]>Cc "Uwe Kleine-König (The Capable Hub)" <[email protected]>Signed-off-by Griffin Kroah-Hartman <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Nice improvement!
Reviewed-by Ian Ray <[email protected]>
Quoted 23 lines
--- drivers/nfc/nxp-nci/i2c.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/nfc/nxp-nci/i2c.c +3
-2@@ -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