Skip to content

Commit 12133a4

Browse files
gregkhkuba-moo
authored andcommitted
nfc: pn533: properly drop the usb interface reference on disconnect
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: c46ee38 ("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>
1 parent 2f61f38 commit 12133a4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/nfc/pn533/usb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ static void pn533_usb_disconnect(struct usb_interface *interface)
628628
usb_free_urb(phy->out_urb);
629629
usb_free_urb(phy->ack_urb);
630630
kfree(phy->ack_buffer);
631+
usb_put_dev(phy->udev);
631632

632633
nfc_info(&interface->dev, "NXP PN533 NFC device disconnected\n");
633634
}

0 commit comments

Comments
 (0)