Bluetooth: Put HCI device if inquiry procedure interrupts
authorPan Bian <bianpan2016@163.com>
Thu, 21 Jan 2021 08:10:45 +0000 (00:10 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Mar 2021 17:22:38 +0000 (18:22 +0100)
commit49e6938165163e3ca95870dbe0ebb6cc007c4a8b
tree4ed85daf338732b0da580feadffe453cc3993bae
parent39bce4ab06e3874746c08d9a0a0564809e2b32a1
Bluetooth: Put HCI device if inquiry procedure interrupts

[ Upstream commit 28a758c861ff290e39d4f1ee0aa5df0f0b9a45ee ]

Jump to the label done to decrement the reference count of HCI device
hdev on path that the Inquiry procedure is interrupted.

Fixes: 3e13fa1e1fab ("Bluetooth: Fix hci_inquiry ioctl usage")
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_core.c