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

Commit 5436193c authored by Nitin Rawat's avatar Nitin Rawat
Browse files

scsi: ufs: Fix Null pointer dereference



Fix the null pointer derefernce.

Change-Id: Ic047458575d2b5b303c7d9004db4c9d89d5959bd
Signed-off-by: default avatarNitin Rawat <nitirawa@codeaurora.org>
parent 4d86e041
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1631,12 +1631,11 @@ 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;

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

	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)
		return;
	group->state = PM_QOS_REQ_UNVOTE;