diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-02-23 14:28:30 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-03-13 19:20:32 +0300 |
| commit | 7ff14eb070f0efecb2606f8d7aa01b77d188e886 (patch) | |
| tree | ca0555c2acbbbb7a4e8132790f15e271a7fde1b3 /drivers/nfc | |
| parent | d71781bad59b1c9d60d7068004581f9bf19c0c9d (diff) | |
| download | linux-7ff14eb070f0efecb2606f8d7aa01b77d188e886.tar.xz | |
nfc: pn533: properly drop the usb interface reference on disconnect
commit 12133a483dfa832241fbbf09321109a0ea8a520e upstream.
When the device is disconnected from the driver, there is a "dangling"
reference count on the usb interface that was grabbed in the probe
callback. Fix this up by properly dropping the reference after we are
done with it.
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Fixes: c46ee38620a2 ("NFC: pn533: add NXP pn533 nfc device driver")
Link: https://patch.msgid.link/2026022329-flashing-ought-7573@gregkh
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nfc')
| -rw-r--r-- | drivers/nfc/pn533/usb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nfc/pn533/usb.c b/drivers/nfc/pn533/usb.c index 018a80674f06..0f12f86ebb02 100644 --- a/drivers/nfc/pn533/usb.c +++ b/drivers/nfc/pn533/usb.c @@ -628,6 +628,7 @@ static void pn533_usb_disconnect(struct usb_interface *interface) usb_free_urb(phy->out_urb); usb_free_urb(phy->ack_urb); kfree(phy->ack_buffer); + usb_put_dev(phy->udev); nfc_info(&interface->dev, "NXP PN533 NFC device disconnected\n"); } |
