From: Sudip Mukherjee Date: Sun, 2 Nov 2014 06:34:41 +0000 (+0530) Subject: ASoC: Intel: fix missing mutex X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=22a236b4d07b5c5cfdc5db9e87d479d32281cfe6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ASoC: Intel: fix missing mutex 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 Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c index c451398b058c..4a5bde9c686b 100644 --- a/sound/soc/intel/sst-firmware.c +++ b/sound/soc/intel/sst-firmware.c @@ -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; }