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

Commit 90ab8919 authored by Ajay Agarwal's avatar Ajay Agarwal Committed by Gerrit - the friendly Code Review server
Browse files

usb: misc: ks_bridge: Fix probe failure on reconnect



Currently the driver does not mark ksb->ifc to NULL explicitly
as a part of bridge_disconnect. When the probe is tried for the
next time, it finds ksb->ifc to be in use and bails out. To fix
this, mark ksb->ifc to NULL as a part of _disconnect.

Change-Id: I0f861ff1a58e95eddb478fb2948d92593d85f2ef
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent df367b38
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -767,6 +767,7 @@ ksb_usb_probe(struct usb_interface *ifc, const struct usb_device_id *id)
clean_dev:
	usb_set_intfdata(ifc, NULL);
	usb_put_intf(ifc);
	ksb->ifc = NULL;
	usb_put_dev(ksb->udev);

	return ret;
@@ -814,6 +815,7 @@ static void ksb_usb_disconnect(struct usb_interface *ifc)
	wake_up(&ksb->ks_wait_q);
	usb_set_intfdata(ifc, NULL);
	usb_put_intf(ifc);
	ksb->ifc = NULL;
	usb_put_dev(ksb->udev);
}