Commit 2a8561b7 authored by Yue Hu's avatar Yue Hu Committed by Martin K. Petersen

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.comSigned-off-by: default avatarYue Hu <huyue2@yulong.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 4517e77e
...@@ -106,7 +106,6 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba) ...@@ -106,7 +106,6 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba)
static int ufshcd_populate_vreg(struct device *dev, const char *name, static int ufshcd_populate_vreg(struct device *dev, const char *name,
struct ufs_vreg **out_vreg) struct ufs_vreg **out_vreg)
{ {
int ret = 0;
char prop_name[MAX_PROP_SIZE]; char prop_name[MAX_PROP_SIZE];
struct ufs_vreg *vreg = NULL; struct ufs_vreg *vreg = NULL;
struct device_node *np = dev->of_node; struct device_node *np = dev->of_node;
...@@ -135,9 +134,8 @@ static int ufshcd_populate_vreg(struct device *dev, const char *name, ...@@ -135,9 +134,8 @@ static int ufshcd_populate_vreg(struct device *dev, const char *name,
vreg->max_uA = 0; vreg->max_uA = 0;
} }
out: out:
if (!ret) *out_vreg = vreg;
*out_vreg = vreg; return 0;
return ret;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment