public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] nfc: pn533: properly drop the usb interface reference on disconnect
@ 2026-02-23 11:28 Greg Kroah-Hartman
  2026-02-24  9:17 ` Simon Horman
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Greg Kroah-Hartman @ 2026-02-23 11:28 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel, Greg Kroah-Hartman, stable

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>
Assisted-by: gkh_clanker_2000
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/nfc/pn533/usb.c | 1 +
 1 file changed, 1 insertion(+)

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");
 }
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-02-26  3:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-23 11:28 [PATCH net] nfc: pn533: properly drop the usb interface reference on disconnect Greg Kroah-Hartman
2026-02-24  9:17 ` Simon Horman
2026-02-25 14:31   ` Greg Kroah-Hartman
2026-02-25 18:57     ` Simon Horman
2026-02-25  1:42 ` Jakub Kicinski
2026-02-25 14:30   ` Greg Kroah-Hartman
2026-02-26  3:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox