Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00fa55ac authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

USB: ccid_bridge: Drop the usb device reference upon disconnect



usb device ref count is incremented in probe via usb_get_dev. Call
usb_put_dev during disconnect to drop the ref count. Otherwise
struct usb_device memory is leaked.

Change-Id: Ia82f5ff7ef1a0a5e5c54f6e52b9e22f8434c45a6
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent e32969a7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -752,6 +752,7 @@ static void ccid_bridge_disconnect(struct usb_interface *intf)
	}

	ccid->intf = NULL;
	usb_put_dev(ccid->udev);

	mutex_unlock(&ccid->event_mutex);
	mutex_unlock(&ccid->read_mutex);