lkml.org 
[lkml]   [2014]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ASoC: Intel: fix missing mutex
Date
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>
---
sound/soc/intel/sst-firmware.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c
index 35788ad..dca6d9a 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;
}

--
1.8.1.2


\
 
 \ /
  Last update: 2014-11-02 08:01    [W:0.039 / U:1.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site