projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4517e77
)
scsi: ufs: core: Remove unnecessary ret in ufshcd_populate_vreg()
author
Yue Hu
<huyue2@yulong.com>
Wed, 10 Mar 2021 08:27:41 +0000
(16:27 +0800)
committer
Martin K. Petersen
<martin.petersen@oracle.com>
Wed, 17 Mar 2021 04:04:40 +0000
(
00:04
-0400)
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>
drivers/scsi/ufs/ufshcd-pltfrm.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/ufs/ufshcd-pltfrm.c
b/drivers/scsi/ufs/ufshcd-pltfrm.c
index
1a69949
..
fedb7de
100644
(file)
--- 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;
}
/**