scsi: ufs: Fix ufshcd_probe_hba() return value when fails to reinit

A non-zero return value could come from ufshcd_hba_enable() when the
host fails at reinit flow. But ufshcd_probe_hba() didn't take the error
value of this case. The patch is to fix this issue.

Bug: 160290772
Change-Id: Iedceeaeb056fe9fb519370ec42424e0542a73ed2
Signed-off-by: Leo Liou <leoliou@google.com>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
fourteen
Leo Liou 5 years ago committed by Jenna
parent fa06b20e43
commit d8de83584e
  1. 4
      drivers/scsi/ufs/ufshcd.c

@ -10045,8 +10045,8 @@ retry:
ufshcd_hba_stop(hba, false);
spin_unlock_irqrestore(hba->host->host_lock, flags);
err = ufshcd_hba_enable(hba);
if (err)
ret = ufshcd_hba_enable(hba);
if (ret)
goto out;
goto retry;

Loading…
Cancel
Save