Commit 12133a48 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Jakub Kicinski
Browse files

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Fixes: c46ee386 ("NFC: pn533: add NXP pn533 nfc device driver")
Link: https://patch.msgid.link/2026022329-flashing-ought-7573@gregkh


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 2f61f38a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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");
}