diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2022-05-23 11:28:18 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-05-23 23:24:10 -0400 |
commit | 476e45923b5df19534178d0ed5c87c517dd6f669 (patch) | |
tree | 7b3dcc44a77fb96a8549a68f06671c5bb717bb4b /drivers/ufs | |
parent | 823ae99e09f7ada9e72c76cb2a9cc6a75a09971e (diff) | |
download | lwn-476e45923b5df19534178d0ed5c87c517dd6f669.tar.gz lwn-476e45923b5df19534178d0ed5c87c517dd6f669.zip |
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 <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ufs')
-rw-r--r-- | drivers/ufs/core/ufshcd.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index efe67a381c32..01fb4bad86be 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -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) |