소스 검색

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 <sudip@vectorindia.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Sudip Mukherjee 11 년 전
부모
커밋
22a236b4d0
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      sound/soc/intel/sst-firmware.c

+ 1 - 0
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;
 	}