diff options
author | Yue Hu <huyue2@yulong.com> | 2021-03-10 09:27:41 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-03-17 05:04:40 +0100 |
commit | 2a8561b78e377f48aa638d7cd203628b6dfc2519 (patch) | |
tree | de9f10bf1fca3953dc52a59aba8a80b9882393a7 /drivers/scsi/ufs | |
parent | scsi: ufs: dt-bindings: Add sm8250, sm8350 compatible strings (diff) | |
download | linux-2a8561b78e377f48aa638d7cd203628b6dfc2519.tar.xz linux-2a8561b78e377f48aa638d7cd203628b6dfc2519.zip |
scsi: ufs: core: Remove unnecessary ret in ufshcd_populate_vreg()
The local variable 'ret' is always zero. Remove it and return 0 at the end
of the function.
Link: https://lore.kernel.org/r/20210310082741.647-1-zbestahu@gmail.com
Signed-off-by: Yue Hu <huyue2@yulong.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs')
-rw-r--r-- | drivers/scsi/ufs/ufshcd-pltfrm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c index 1a69949a4ea1..fedb7deb3304 100644 --- a/drivers/scsi/ufs/ufshcd-pltfrm.c +++ b/drivers/scsi/ufs/ufshcd-pltfrm.c @@ -106,7 +106,6 @@ out: static int ufshcd_populate_vreg(struct device *dev, const char *name, struct ufs_vreg **out_vreg) { - int ret = 0; char prop_name[MAX_PROP_SIZE]; struct ufs_vreg *vreg = NULL; struct device_node *np = dev->of_node; @@ -135,9 +134,8 @@ static int ufshcd_populate_vreg(struct device *dev, const char *name, vreg->max_uA = 0; } out: - if (!ret) - *out_vreg = vreg; - return ret; + *out_vreg = vreg; + return 0; } /** |