ASoC: Ux500: unlock on an error path
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 16 Jun 2012 13:19:27 +0000 (16:19 +0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 17 Jun 2012 19:48:44 +0000 (20:48 +0100)
There is a missing mutex_unlock() here.  The cleanup path also has more
debug output.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/ab8500-codec.c

index 389dd660b511fab92ac3b4912405b3a6bc0f5e39..3c795921c5f6b840f6654d53907ed44e18435841 100644 (file)
@@ -1235,7 +1235,8 @@ static int anc_status_control_put(struct snd_kcontrol *kcontrol,
                req != ANC_APPLY_IIR) {
                dev_err(dev, "%s: ERROR: Unsupported status to set '%s'!\n",
                        __func__, enum_anc_state[req]);
-               return -EINVAL;
+               status = -EINVAL;
+               goto cleanup;
        }
        apply_fir = req == ANC_APPLY_FIR || req == ANC_APPLY_FIR_IIR;
        apply_iir = req == ANC_APPLY_IIR || req == ANC_APPLY_FIR_IIR;