mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
scsi: ufs-qti: Check for valid vcc before accessing
This patch fixes a NULL pointer dereference by checking if vccq & vccq2 are valid before dereferencing it. Change-Id: Ieb5aefab77428adbbbbf892f2be1a9942d7c3851 Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
This commit is contained in:
parent
90ae165d38
commit
4eb78fc2b5
1 changed files with 2 additions and 2 deletions
|
|
@ -8323,9 +8323,9 @@ reinit:
|
|||
* 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->dev_info.w_spec_version < 0x300 && hba->vreg_info.vccq2 &&
|
||||
hba->vreg_info.vccq2->sys_suspend_pwr_off))
|
||||
hba->spm_lvl = ufs_get_desired_pm_lvl_for_dev_link_state(
|
||||
UFS_POWERDOWN_PWR_MODE,
|
||||
|
|
|
|||
Loading…
Reference in a new issue