Skip to contentSkip to conversation

ASoC: Intel: fix missing mutex

PATCH Applied Sudip Mukherjee 2 participants 2 messages Nov 2, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 sound/soc/intel/sst-firmware.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/intel/sst-firmware.c +1 -0
index 35788ad..dca6d9a 100644
@@ -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;
 	}
 
Signature · 1 line
1.8.1.2
maintainer Applied
#1 lore raw
Quoted 3 lines · Sudip Mukherjee

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.

Applied, thanks.