]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ASoC: wm_adsp: Fixup wm_adsp2_boot_work error paths
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tue, 24 Jan 2017 11:44:01 +0000 (11:44 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 24 Jan 2017 12:14:36 +0000 (12:14 +0000)
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: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm_adsp.c

index 746a5e23cb8bd064cb61cad5cd5c9fa818312125..651857b529f97129001d9d79752e0dba3a408340 100644 (file)
@@ -2450,7 +2450,7 @@ static void wm_adsp2_boot_work(struct work_struct *work)
 
        ret = wm_adsp2_ena(dsp);
        if (ret != 0)
-               goto err_mutex;
+               goto err_mem;
 
        ret = wm_adsp_load(dsp);
        if (ret != 0)
@@ -2484,6 +2484,9 @@ static void wm_adsp2_boot_work(struct work_struct *work)
 err_ena:
        regmap_update_bits(dsp->regmap, dsp->base + ADSP2_CONTROL,
                           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:
        mutex_unlock(&dsp->pwr_lock);
 }