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

Commit 2d320e52 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: Do not disconnect unregistered dev"

parents 20f03490 02153a0f
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1528,7 +1528,14 @@ static int android_setup(struct usb_gadget *gadget,
static void android_disconnect(struct usb_gadget *gadget)
{
	struct usb_composite_dev        *cdev = get_gadget_data(gadget);
	struct gadget_info *gi = container_of(cdev, struct gadget_info, cdev);
	struct gadget_info *gi;

	if (!cdev) {
		pr_err("%s: gadget is not connected\n", __func__);
		return;
	}

	gi = container_of(cdev, struct gadget_info, cdev);

	/* accessory HID support can be active while the
		accessory function is not actually enabled,