]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: ttusb-dec: avoid release of non-acquired mutex
authorEvgeny Novikov <novikov@ispras.ru>
Tue, 20 Jul 2021 09:28:27 +0000 (11:28 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 10 Aug 2021 11:08:38 +0000 (13:08 +0200)
commit79c71701d70e621e354c86fd7ecb4013e6c40efd
tree8a65fd0da9938d4998451b1569ae92d747d00736
parent93d6538cc777b22def91eeab0de9fd4522dd1869
media: ttusb-dec: avoid release of non-acquired mutex

ttusb_dec_send_command() invokes mutex_lock_interruptible() that can
fail but then it releases the non-acquired mutex. The patch fixes that.

Found by Linux Driver Verification project (linuxtesting.org).

Fixes: dba328bab4c6 ("media: ttusb-dec: cleanup an error handling logic")
Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/usb/ttusb-dec/ttusb_dec.c