diff options
author | Yue Hu <huyue2@yulong.com> | 2021-03-19 15:09:16 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-03-24 22:53:20 -0400 |
commit | 0873045f63c474db5c9f816a01fb1a7f64ea21b2 (patch) | |
tree | d6d622ae91b611b9a0ded5344fb3629087cda865 /drivers/scsi/ufs | |
parent | 1630e752fb8340b188c45eed4fe52a9f2a918e27 (diff) |
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.com
Signed-off-by: Yue Hu <huyue2@yulong.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs')
-rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 95fd813068a7..8ca8ceb9c145 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -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, |