scsi: ufs: ufshcd: delete unnecessary NULL check
Subsystems (3)
PATCH 1/1 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.
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/ufs/core/ufshcd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/ufs/core/ufshcd.c +1 -4
@@ -8445,10 +8445,7 @@ static int ufshcd_init_hba_vreg(struct ufs_hba *hba) {struct ufs_vreg_info *info = &hba->vreg_info; -if (info) -return ufshcd_get_vreg (hba->dev, info->vdd_hba); - -return 0 ; +return ufshcd_get_vreg (hba->dev, info->vdd_hba); }static int ufshcd_setup_clocks (struct ufs_hba *hba,bool on)
Signature · 1 line
2.35.1
Martin K. Petersen
AppliedDan,
Quoted 2 lines
The "info" pointer points to somewhere in the middle of the "hba" struct. It can't possibly be NULL. Delete the NULL check.
Applied to 5.19/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 4 lines · Dan Carpenter
The "info" pointer points to somewhere in the middle of the "hba" struct. It can't possibly be NULL. Delete the NULL check.
Applied to 5.19/scsi-queue, thanks!
[1/1] scsi: ufs: ufshcd: delete unnecessary NULL check
https://git.kernel.org/mkp/scsi/c/476e45923b5d
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering