From: Dan Carpenter Date: Mon, 23 May 2022 08:28:18 +0000 (+0300) Subject: scsi: ufs: ufshcd: Delete unnecessary NULL check X-Git-Tag: v6.6.17~7315^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=476e45923b5df19534178d0ed5c87c517dd6f669;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Martin K. Petersen --- diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index efe67a3..01fb4ba 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)