Fix the bug of not unlock before return
authorTracy Yi <tracy-yi@ti.com>
Mon, 28 Jan 2019 10:44:29 +0000 (18:44 +0800)
committerTracy Yi <tracy-yi@ti.com>
Mon, 28 Jan 2019 10:44:29 +0000 (18:44 +0800)
Signed-off-by: Tracy Yi <tracy-yi@ti.com>
tas2563-codec.c

index ab85051cbbc5ca1d1442634be8a6522218bb2436..d32bfd9eb794c42c6b620d98e4d256a64240cd34 100644 (file)
@@ -2230,8 +2230,8 @@ static int tas2563_hw_params(struct snd_pcm_substream *substream,
 
        ret = tas2563_set_samplerate(pTAS2563, params_rate(params));
 
 
        ret = tas2563_set_samplerate(pTAS2563, params_rate(params));
 
-       mutex_unlock(&pTAS2563->codec_lock);
 ret:
 ret:
+       mutex_unlock(&pTAS2563->codec_lock);
        return ret;
 }
 
        return ret;
 }