ASoC: soc-compress: fix double unlock of fe card mutex
authorQiao Zhou <zhouqiao@marvell.com>
Fri, 12 Sep 2014 01:41:31 +0000 (09:41 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 24 Sep 2014 10:38:55 +0000 (11:38 +0100)
Fix double unlock of fe card mutex introduced by patch 8f70e515a8bb
"ASoC: soc-pcm: fix dpcm_path_get error handling"

The first unlock is at line 106, and the unlock is at line 149. we
should remove the first unlock.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-compress.c

index 3092b58..cecfab3 100644 (file)
@@ -102,13 +102,11 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream)
        fe->dpcm[stream].runtime = fe_substream->runtime;
 
        ret = dpcm_path_get(fe, stream, &list);
-       if (ret < 0) {
-               mutex_unlock(&fe->card->mutex);
+       if (ret < 0)
                goto fe_err;
-       } else if (ret == 0) {
+       else if (ret == 0)
                dev_dbg(fe->dev, "ASoC: %s no valid %s route\n",
                        fe->dai_link->name, stream ? "capture" : "playback");
-       }
 
        /* calculate valid and active FE <-> BE dpcms */
        dpcm_process_paths(fe, stream, &list, 1);