Commit 0873045f authored by Yue Hu's avatar Yue Hu Committed by Martin K. Petersen

scsi: ufs: Remove unnecessary NULL checks in ufshcd_find_max_sup_active_icc_level()

vcc/vccq/vccq2 have already been NULL checked at this point in
ufshcd_find_max_sup_active_icc_level().

Link: https://lore.kernel.org/r/20210319070916.2254-1-zbestahu@gmail.comSigned-off-by: default avatarYue Hu <huyue2@yulong.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 1630e752
......@@ -7138,19 +7138,19 @@ static u32 ufshcd_find_max_sup_active_icc_level(struct ufs_hba *hba,
goto out;
}
if (hba->vreg_info.vcc && hba->vreg_info.vcc->max_uA)
if (hba->vreg_info.vcc->max_uA)
icc_level = ufshcd_get_max_icc_level(
hba->vreg_info.vcc->max_uA,
POWER_DESC_MAX_ACTV_ICC_LVLS - 1,
&desc_buf[PWR_DESC_ACTIVE_LVLS_VCC_0]);
if (hba->vreg_info.vccq && hba->vreg_info.vccq->max_uA)
if (hba->vreg_info.vccq->max_uA)
icc_level = ufshcd_get_max_icc_level(
hba->vreg_info.vccq->max_uA,
icc_level,
&desc_buf[PWR_DESC_ACTIVE_LVLS_VCCQ_0]);
if (hba->vreg_info.vccq2 && hba->vreg_info.vccq2->max_uA)
if (hba->vreg_info.vccq2->max_uA)
icc_level = ufshcd_get_max_icc_level(
hba->vreg_info.vccq2->max_uA,
icc_level,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment