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

Commit cce9178e 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: qdss: Add check before performing uninit_data()"

parents f751dc96 44c81ae9
Loading
Loading
Loading
Loading
+12 −10
Original line number Diff line number Diff line
@@ -503,19 +503,21 @@ static void usb_qdss_disconnect_work(struct work_struct *work)
	pr_debug("usb_qdss_disconnect_work\n");
	switch (dxport) {
	case USB_GADGET_XPORT_BAM:
		/*
		 * Uninitialized init data i.e. ep specific operation.
		 * Notify qdss to cancel all active transfers.
		 */
		if (qdss->ch.app_conn) {
			status = uninit_data(qdss->port.data);
			if (status)
				pr_err("%s: uninit_data error\n", __func__);
		/* notify qdss to cancell all active transfers*/
		if (qdss->ch.notify) {

			if (qdss->ch.notify)
				qdss->ch.notify(qdss->ch.priv,
					USB_QDSS_DISCONNECT,
					NULL,
					NULL);
			/*
			 * If the app was never started,
			 * we can skip USB BAM reset.
			 */

			status = set_qdss_data_connection(
					qdss->cdev->gadget,
					qdss->port.data,