Bluetooth: hci_conn: Fix not cleaning up on LE Connection failure
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 24 Mar 2023 17:57:55 +0000 (10:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Apr 2023 10:35:09 +0000 (12:35 +0200)
commit7c90d78301f8f880d1e2392e7e56a9b58f3f707a
treeb8bff75d5b9abc903c5042bbb4da2392c1444e38
parent644b3051b06ba465bc7401bfae9b14963cbc8c1c
Bluetooth: hci_conn: Fix not cleaning up on LE Connection failure

[ Upstream commit 19cf60bf63cbaf5262eac400c707966e19999b83 ]

hci_connect_le_scan_cleanup shall always be invoked to cleanup the
states and re-enable passive scanning if necessary, otherwise it may
cause the pending action to stay active causing multiple attempts to
connect.

Fixes: 9b3628d79b46 ("Bluetooth: hci_sync: Cleanup hci_conn if it cannot be aborted")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_conn.c