ASoC: Intel: fix missing mutex
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Sun, 2 Nov 2014 06:34:41 +0000 (12:04 +0530)
committerMark Brown <broonie@kernel.org>
Sun, 2 Nov 2014 11:07:28 +0000 (11:07 +0000)
on error in block prepare, we were returning the error code while still
holding the mutex. We are releasing the mutex in this patch before
return.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/sst-firmware.c

index c451398b058ca54e1647ff84196ec79ab1d84f1c..4a5bde9c686be2bbe967fcdd899f7c10f52a74c1 100644 (file)
@@ -1120,6 +1120,7 @@ int sst_block_alloc_scratch(struct sst_dsp *dsp)
        ret = block_list_prepare(dsp, &dsp->scratch_block_list);
        if (ret < 0) {
                dev_err(dsp->dev, "error: scratch block prepare failed\n");
+               mutex_unlock(&dsp->mutex);
                return ret;
        }