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

Commit d589d8b8 authored by Charles Keepax's avatar Charles Keepax Committed by Mark Brown
Browse files

ASoC: wm_adsp: Fixup wm_adsp2_boot_work error paths



Currently we are not disabling MEM_ENA on the error path, we should
really do this to unwind the state back to how it was. This patch adds a
clear of MEM_ENA on the error path, again there is no major issues
caused by this minor fix.

Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e779974b
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -2450,7 +2450,7 @@ static void wm_adsp2_boot_work(struct work_struct *work)


	ret = wm_adsp2_ena(dsp);
	ret = wm_adsp2_ena(dsp);
	if (ret != 0)
	if (ret != 0)
		goto err_mutex;
		goto err_mem;


	ret = wm_adsp_load(dsp);
	ret = wm_adsp_load(dsp);
	if (ret != 0)
	if (ret != 0)
@@ -2484,6 +2484,9 @@ static void wm_adsp2_boot_work(struct work_struct *work)
err_ena:
err_ena:
	regmap_update_bits(dsp->regmap, dsp->base + ADSP2_CONTROL,
	regmap_update_bits(dsp->regmap, dsp->base + ADSP2_CONTROL,
			   ADSP2_SYS_ENA | ADSP2_CORE_ENA | ADSP2_START, 0);
			   ADSP2_SYS_ENA | ADSP2_CORE_ENA | ADSP2_START, 0);
err_mem:
	regmap_update_bits(dsp->regmap, dsp->base + ADSP2_CONTROL,
			   ADSP2_MEM_ENA, 0);
err_mutex:
err_mutex:
	mutex_unlock(&dsp->pwr_lock);
	mutex_unlock(&dsp->pwr_lock);
}
}