scsi: ufs: fix error return code of ufshcd_devfreq_target()
PATCH 1/1 scsi: ufs: fix error return code of ufshcd_devfreq_target()
When the list of clk_list is empty, no error return code of ufshcd_devfreq_target() is assigned.
To fix this bug, ret is assigned with -ENOENT as error return code.
Reported-by TOTE Robot <[email protected]>
Signed-off-by Jia-Ju Bai <[email protected]>
--- drivers/scsi/ufs/ufshcd.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/ufs/ufshcd.c +1 -0
@@ -1337,6 +1337,7 @@ static int ufshcd_devfreq_target(struct device *dev,if (list_empty (clk_list)) {spin_unlock_irqrestore (hba->host->host_lock, irq_flags); + ret = -ENOENT ; goto out; }
Signature · 1 line
2.17.1