diff mbox series

[v2,1/9] scsi: ufs: goto with returned value while failed to add WL

Message ID 20200116215914.16015-2-huobean@gmail.com (mailing list archive)
State Superseded
Headers show
Series Use UFS device indicated maximum LU number | expand

Commit Message

Bean Huo Jan. 16, 2020, 9:59 p.m. UTC
From: Bean Huo <beanhuo@micron.com>

This patch is to make goto statement with failure result in case of
failure of adding well known LUs.

Fixes: 2a8fa600445c ("ufs: manually add well known logical units")
Signed-off-by: Bean Huo <beanhuo@micron.com>
---
 drivers/scsi/ufs/ufshcd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Bart Van Assche Jan. 17, 2020, 3:56 a.m. UTC | #1
On 2020-01-16 13:59, Bean Huo wrote:
> From: Bean Huo <beanhuo@micron.com>
> 
> This patch is to make goto statement with failure result in case of
> failure of adding well known LUs.

Please make the subject more clear, e.g. "Fix ufshcd_probe_hba() return
value in case ufshcd_scsi_add_wlus() fails"

Thanks,

Bart.
Bean Huo Jan. 17, 2020, 12:57 p.m. UTC | #2
Hi, Bart

> On 2020-01-16 13:59, Bean Huo wrote:
> > From: Bean Huo <beanhuo@micron.com>
> >
> > This patch is to make goto statement with failure result in case of
> > failure of adding well known LUs.
> 
> Please make the subject more clear, e.g. "Fix ufshcd_probe_hba() return value in
> case ufshcd_scsi_add_wlus() fails"
> 
Ok, you are always expert on English, I will change it in next version.
Thanks,

//Bean
Asutosh Das (asd) Jan. 17, 2020, 6:23 p.m. UTC | #3
On 1/16/2020 1:59 PM, Bean Huo wrote:
> From: Bean Huo <beanhuo@micron.com>
> 
> This patch is to make goto statement with failure result in case of
> failure of adding well known LUs.
> 
> Fixes: 2a8fa600445c ("ufs: manually add well known logical units")
> Signed-off-by: Bean Huo <beanhuo@micron.com>
> ---
>   drivers/scsi/ufs/ufshcd.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index bea036ab189a..9a9085a7bcc5 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -7032,7 +7032,8 @@ static int ufshcd_probe_hba(struct ufs_hba *hba)
>   			ufshcd_init_icc_levels(hba);
>   
>   		/* Add required well known logical units to scsi mid layer */
> -		if (ufshcd_scsi_add_wlus(hba))
> +		ret = ufshcd_scsi_add_wlus(hba);
> +		if (ret)
>   			goto out;
>   
>   		/* Initialize devfreq after UFS device is detected */
> 

Please retain my reviewed-by tag, if you change the commit message as 
per Bart's reviews in your next version.

Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index bea036ab189a..9a9085a7bcc5 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -7032,7 +7032,8 @@  static int ufshcd_probe_hba(struct ufs_hba *hba)
 			ufshcd_init_icc_levels(hba);
 
 		/* Add required well known logical units to scsi mid layer */
-		if (ufshcd_scsi_add_wlus(hba))
+		ret = ufshcd_scsi_add_wlus(hba);
+		if (ret)
 			goto out;
 
 		/* Initialize devfreq after UFS device is detected */