]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
soundwire: stream: fix bad unlock balance
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Thu, 6 Jun 2019 11:22:22 +0000 (12:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 14 Jul 2019 06:09:38 +0000 (08:09 +0200)
commit2d48fa440c70bb22153da18c753e66846ed74a61
tree1d89cc7dede27739ce378c5c717dc7f44ae3545b
parent0493503b1e28a8d096d241903f338303b5c908c2
soundwire: stream: fix bad unlock balance

[ Upstream commit 9315d904c7e8f38886e2820fa6cb8d0fa723ea21 ]

the msg lock is taken for multi-link cases only but released
unconditionally, leading to an unlock balance warning for single-link usages
This patch fixes this.

 =====================================
 WARNING: bad unlock balance detected!
 5.1.0-16506-gc1c383a6f0a2-dirty #1523 Tainted: G        W
 -------------------------------------
 aplay/2954 is trying to release lock (&bus->msg_lock) at:
 do_bank_switch+0x21c/0x480
 but there are no more locks to release!

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Sanyog Kale <sanyog.r.kale@intel.com>
[vkoul: edited the change log as suggested by Pierre]
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soundwire/stream.c