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

Commit 77a18cf9 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "scsi: ufs: Check boundary condition on pm qos active_reqs"

parents 5176b599 acc7f267
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1631,6 +1631,10 @@ static void __ufs_qcom_pm_qos_req_end(struct ufs_qcom_host *host, int req_cpu)
	if (!host->pm_qos.groups || !host->pm_qos.is_enabled)
		return;

	if (group->active_reqs <= 0)
		pr_err_ratelimited("ufshcd-qcom: active req coount is negative: %d\n",
					group->active_reqs);

	group = &host->pm_qos.groups[ufs_qcom_cpu_to_group(host, req_cpu)];

	if (--group->active_reqs)