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

Commit 626aa661 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: gps: Handle case when response queue is empty"

parents 170e363c 58d59039
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -560,8 +560,9 @@ gps_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)

			spin_lock(&dev->lock);
			if (list_empty(&dev->cpkt_resp_q)) {
				pr_err("%s: ctrl resp queue empty", __func__);
				spin_unlock(&dev->lock);
				pr_debug("%s: ctrl resp queue empty", __func__);
				ret = 0;
				goto invalid;
			}