]> asedeno.scripts.mit.edu Git - linux.git/commit
ASoC: pcm512x: Fix a double unlock in pcm512x_digital_mute()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 21 Dec 2018 09:11:20 +0000 (12:11 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 3 Jan 2019 16:32:52 +0000 (16:32 +0000)
commit28b698b7342c7d5300cfe217cd77ff7d2a55e03d
treed695309cc1d97634b1b737e14307b6c815fbe5fc
parentfd270fca2001bcdac0658eb673c20920baeed86c
ASoC: pcm512x: Fix a double unlock in pcm512x_digital_mute()

We accidentally call mutex_unlock(&pcm512x->mutex); twice in a row.

I re-wrote the error handling to use "goto unlock;" instead of returning
directly.  Hopefully, it makes the code a little simpler.

Fixes: 3500f1c589e9 ("ASoC: pcm512x: Implement the digital_mute interface")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviwed-by: Dimitris Papavasiliou <dpapavas@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/pcm512x.c