summaryrefslogtreecommitdiff
path: root/drivers/scsi/ufs/ufs-exynos.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-06-26 13:51:33 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2020-06-30 04:33:20 +0300
commitb7a80dac0f1f16ca5714b89ace8a3fc079686875 (patch)
treef4c07586492d8e5432bfbc8e6a07a0a90b1b9bbf /drivers/scsi/ufs/ufs-exynos.c
parentfbca7a04dbd8271752a58594727b61307bcc85b6 (diff)
downloadlinux-b7a80dac0f1f16ca5714b89ace8a3fc079686875.tar.xz
scsi: ufs: ufs-exynos: Remove an unnecessary NULL check
The "head" pointer can't be NULL because it points to an address in the middle of a ufs_hba struct. Looking at this code, probably someone would wonder if the intent was to check whether "hba" is NULL, but "hba" isn't NULL and the check can just be removed. Link: https://lore.kernel.org/r/20200626105133.GF314359@mwanda Acked-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufs-exynos.c')
-rw-r--r--drivers/scsi/ufs/ufs-exynos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c
index b0796066a449..32b61ba77241 100644
--- a/drivers/scsi/ufs/ufs-exynos.c
+++ b/drivers/scsi/ufs/ufs-exynos.c
@@ -264,7 +264,7 @@ static int exynos_ufs_get_clk_info(struct exynos_ufs *ufs)
u8 div = 0;
int ret = 0;
- if (!head || list_empty(head))
+ if (list_empty(head))
goto out;
list_for_each_entry(clki, head, list) {