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

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

Merge "scsi: ufs: Check presence of vccq before de-referencing"

parents 3918cbe1 63a405b5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -9097,7 +9097,7 @@ static int ufshcd_probe_hba(struct ufs_hba *hba)
	 * during system suspend events. This will cause the UFS
	 * device to re-initialize upon system resume events.
	 */
	if ((hba->dev_info.w_spec_version >= 0x300 &&
	if ((hba->dev_info.w_spec_version >= 0x300 && hba->vreg_info.vccq &&
		hba->vreg_info.vccq->sys_suspend_pwr_off) ||
		(hba->dev_info.w_spec_version < 0x300 &&
		hba->vreg_info.vccq2->sys_suspend_pwr_off))
@@ -10451,6 +10451,7 @@ static void ufshcd_vreg_set_lpm(struct ufs_hba *hba)
	    !hba->dev_info.is_lu_power_on_wp) {
		ufshcd_toggle_vreg(hba->dev, hba->vreg_info.vcc, false);
		if (hba->dev_info.w_spec_version >= 0x300 &&
			hba->vreg_info.vccq &&
			hba->vreg_info.vccq->sys_suspend_pwr_off)
			ufshcd_toggle_vreg(hba->dev,
				hba->vreg_info.vccq, false);
@@ -10489,6 +10490,7 @@ static int ufshcd_vreg_set_hpm(struct ufs_hba *hba)
			goto vcc_disable;

		if (hba->dev_info.w_spec_version >= 0x300 &&
			hba->vreg_info.vccq &&
			hba->vreg_info.vccq->sys_suspend_pwr_off)
			ret = ufshcd_toggle_vreg(hba->dev,
				hba->vreg_info.vccq, true);