Skip to content

Commit 476e459

Browse files
Dan Carpentermartinkpetersen
authored andcommitted
scsi: ufs: ufshcd: Delete unnecessary NULL check
The 'info' pointer points to somewhere in the middle of the 'hba' struct. It can't possibly be NULL. Delete the NULL check. Link: https://lore.kernel.org/r/YotFotj43TkB8Rid@kili Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 823ae99 commit 476e459

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/ufs/core/ufshcd.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8445,10 +8445,7 @@ static int ufshcd_init_hba_vreg(struct ufs_hba *hba)
84458445
{
84468446
struct ufs_vreg_info *info = &hba->vreg_info;
84478447

8448-
if (info)
8449-
return ufshcd_get_vreg(hba->dev, info->vdd_hba);
8450-
8451-
return 0;
8448+
return ufshcd_get_vreg(hba->dev, info->vdd_hba);
84528449
}
84538450

84548451
static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on)

0 commit comments

Comments
 (0)