diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 56726c028e59..c3c933f1f14d 100755 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -2277,9 +2277,9 @@ static int ufshcd_devfreq_scale(struct ufs_hba *hba, bool scale_up) if (ufshcd_is_auto_hibern8_supported(hba) && hba->hibern8_on_idle.is_enabled) { ret = ufshcd_uic_hibern8_enter(hba); + /* link will be bad state so no need to scale_up_gear */ if (ret) - /* link will be bad state so no need to scale_up_gear */ - return ret; + goto clk_scaling_unprepare; ufshcd_custom_cmd_log(hba, "Hibern8-entered"); } @@ -2291,9 +2291,9 @@ static int ufshcd_devfreq_scale(struct ufs_hba *hba, bool scale_up) if (ufshcd_is_auto_hibern8_supported(hba) && hba->hibern8_on_idle.is_enabled) { ret = ufshcd_uic_hibern8_exit(hba); + /* link will be bad state so no need to scale_up_gear */ if (ret) - /* link will be bad state so no need to scale_up_gear */ - return ret; + goto clk_scaling_unprepare; ufshcd_custom_cmd_log(hba, "Hibern8-Exited"); }