Browse Source

audio-lnx: Correct mutex usage during error handling

Release the acquired mutex when there is failure
in enabling the soundwire clock.

Change-Id: I2e10ed7f0bd86524998a67d62e85754f7989eca2
Signed-off-by: Ramprasad Katkam <[email protected]>
Ramprasad Katkam 7 years ago
parent
commit
f6d89a5094
1 changed files with 1 additions and 1 deletions
  1. 1 1
      asoc/codecs/msm_sdw/msm_sdw_cdc.c

+ 1 - 1
asoc/codecs/msm_sdw/msm_sdw_cdc.c

@@ -256,8 +256,8 @@ static int msm_int_enable_sdw_cdc_clk(struct msm_sdw_priv *msm_sdw,
 			msm_sdw->int_mclk1_enabled = false;
 		}
 	}
-	mutex_unlock(&msm_sdw->cdc_int_mclk1_mutex);
 rtn:
+	mutex_unlock(&msm_sdw->cdc_int_mclk1_mutex);
 	return ret;
 }
 EXPORT_SYMBOL(msm_int_enable_sdw_cdc_clk);