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

Commit 702f0fcc 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: f_diag: Decrement counter if zero length packet queueing fails"

parents 4619455e 00acfec5
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -2,7 +2,7 @@
 * Diag Function Device - Route ARM9 and ARM11 DIAG messages
 * Diag Function Device - Route ARM9 and ARM11 DIAG messages
 * between HOST and DEVICE.
 * between HOST and DEVICE.
 * Copyright (C) 2007 Google, Inc.
 * Copyright (C) 2007 Google, Inc.
 * Copyright (c) 2008-2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2008-2016, The Linux Foundation. All rights reserved.
 * Author: Brian Swetland <swetland@google.com>
 * Author: Brian Swetland <swetland@google.com>
 * This software is licensed under the terms of the GNU General Public
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * License version 2, as published by the Free Software Foundation, and
@@ -240,6 +240,7 @@ static void diag_write_complete(struct usb_ep *ep,
			/* Queue zero length packet */
			/* Queue zero length packet */
			if (!usb_ep_queue(ctxt->in, req, GFP_ATOMIC))
			if (!usb_ep_queue(ctxt->in, req, GFP_ATOMIC))
				return;
				return;
			ctxt->dpkts_tolaptop_pending--;
		} else {
		} else {
			ctxt->dpkts_tolaptop++;
			ctxt->dpkts_tolaptop++;
		}
		}