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

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

Merge "usb: f_gps: Fix infinite loop of response available notifications"

parents 383c57ee 3cc1fa95
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -255,6 +255,7 @@ static void gps_purge_responses(struct f_gps *dev)

	pr_debug("%s: port#%d\n", __func__, dev->port_num);

	usb_ep_dequeue(dev->notify, dev->notify_req);
	spin_lock_irqsave(&dev->lock, flags);
	while (!list_empty(&dev->cpkt_resp_q)) {
		cpkt = list_first_entry(&dev->cpkt_resp_q,
@@ -599,6 +600,8 @@ static void gps_notify_complete(struct usb_ep *ep, struct usb_request *req)
		if (!atomic_read(&dev->ctrl_online))
			break;

		pr_debug("%s: decrement notify_count:%u\n", __func__,
				atomic_read(&dev->notify_count));
		if (atomic_dec_and_test(&dev->notify_count))
			break;