OSDN Git Service

wcd9335: fix inconsistent mutex_lock
authorDavid Lin <dtwlin@google.com>
Fri, 2 Jun 2017 03:47:18 +0000 (20:47 -0700)
committerArian <arian.kulmer@web.de>
Tue, 19 Nov 2019 14:36:09 +0000 (15:36 +0100)
sound/soc/codecs/wcd9335.c:2608 slim_tx_mixer_put() warn: inconsistent
returns 'mutex:&tasha_p->codec_mutex'

Change-Id: I73d5331aa29155c85cce6940fe2b918cc7a445f6
Signed-off-by: David Lin <dtwlin@google.com>
sound/soc/codecs/wcd9335.c

index 2bc911e..bb99e98 100644 (file)
@@ -2580,6 +2580,7 @@ static int slim_tx_mixer_put(struct snd_kcontrol *kcontrol,
                if (dai_id >= ARRAY_SIZE(vport_i2s_check_table)) {
                        dev_err(codec->dev, "%s: dai_id: %d, out of bounds\n",
                                __func__, dai_id);
+                       mutex_unlock(&tasha_p->codec_mutex);
                        return -EINVAL;
                }
                vtable = vport_i2s_check_table[dai_id];