Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 923243ad authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "asoc: bolero: rx-macro: Fix mutex unlock in error handling"

parents 830af558 39e8a1f8
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1175,14 +1175,14 @@ static int rx_macro_mclk_ctrl(struct device *dev, bool enable)
		ret = clk_prepare_enable(rx_priv->rx_core_clk);
		if (ret < 0) {
			dev_err_ratelimited(dev, "%s:rx mclk enable failed\n", __func__);
			return ret;
			goto exit;
		}
		ret = clk_prepare_enable(rx_priv->rx_npl_clk);
		if (ret < 0) {
			clk_disable_unprepare(rx_priv->rx_core_clk);
			dev_err(dev, "%s:rx npl_clk enable failed\n",
				__func__);
			return ret;
			goto exit;
		}
		if (rx_priv->rx_mclk_cnt++ == 0) {
			if (rx_priv->dev_up)
@@ -1192,7 +1192,7 @@ static int rx_macro_mclk_ctrl(struct device *dev, bool enable)
		if (rx_priv->rx_mclk_cnt <= 0) {
			dev_dbg(dev, "%s:rx mclk already disabled\n", __func__);
			rx_priv->rx_mclk_cnt = 0;
			return 0;
			goto exit;
		}
		if (--rx_priv->rx_mclk_cnt == 0) {
			if (rx_priv->dev_up)
@@ -1201,9 +1201,9 @@ static int rx_macro_mclk_ctrl(struct device *dev, bool enable)
		clk_disable_unprepare(rx_priv->rx_npl_clk);
		clk_disable_unprepare(rx_priv->rx_core_clk);
	}

exit:
	mutex_unlock(&rx_priv->clk_lock);
	return 0;
	return ret;
}

static int rx_macro_event_handler(struct snd_soc_codec *codec, u16 event,