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

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

Merge "soc: qcom: glink_pkt: Add mutex in glink_pkt_read" into msm-4.9

parents 0b73f44c 912b1ebb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -625,14 +625,17 @@ ssize_t glink_pkt_read(struct file *file,
		return -ENETRESET;
	}

	mutex_lock(&devp->ch_lock);
	if (!glink_rx_intent_exists(devp->handle, count)) {
		ret  = glink_queue_rx_intent(devp->handle, devp, count);
		if (ret) {
			GLINK_PKT_ERR("%s: failed to queue_rx_intent ret[%d]\n",
					__func__, ret);
			mutex_unlock(&devp->ch_lock);
			return ret;
		}
	}
	mutex_unlock(&devp->ch_lock);

	GLINK_PKT_INFO("Begin %s on glink_pkt_dev id:%d buffer_size %zu\n",
		__func__, devp->i, count);