* [PATCH] scsi: ufs: Remove unnecessary ret in ufshcd_populate_vreg()
@ 2021-03-10 8:27 Yue Hu
2021-03-19 3:46 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Yue Hu @ 2021-03-10 8:27 UTC (permalink / raw)
To: martin.petersen, jejb, alim.akhtar, avri.altman, beanhuo,
stanley.chu, cang
Cc: linux-scsi, linux-kernel, huyue2, zbestahu, zhangwen
From: Yue Hu <huyue2@yulong.com>
The local variable _ret_ is always zero, so we can remove it and just
return 0 directly in the end.
Signed-off-by: Yue Hu <huyue2@yulong.com>
---
drivers/scsi/ufs/ufshcd-pltfrm.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
index 1a69949..fedb7de 100644
--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -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,
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;
}
/**
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: ufs: Remove unnecessary ret in ufshcd_populate_vreg()
2021-03-10 8:27 [PATCH] scsi: ufs: Remove unnecessary ret in ufshcd_populate_vreg() Yue Hu
@ 2021-03-19 3:46 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2021-03-19 3:46 UTC (permalink / raw)
To: alim.akhtar, beanhuo, avri.altman, cang, Yue Hu, stanley.chu, jejb
Cc: Martin K . Petersen, zhangwen, zbestahu, linux-kernel,
linux-scsi, huyue2
On Wed, 10 Mar 2021 16:27:41 +0800, Yue Hu wrote:
> The local variable _ret_ is always zero, so we can remove it and just
> return 0 directly in the end.
Applied to 5.13/scsi-queue, thanks!
[1/1] scsi: ufs: Remove unnecessary ret in ufshcd_populate_vreg()
https://git.kernel.org/mkp/scsi/c/2a8561b78e37
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-19 3:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 8:27 [PATCH] scsi: ufs: Remove unnecessary ret in ufshcd_populate_vreg() Yue Hu
2021-03-19 3:46 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).