]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Bluetooth: hci_sync: Ignore errors from HCI_OP_REMOTE_NAME_REQ_CANCEL
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 16 Aug 2023 19:05:00 +0000 (12:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:32:29 +0000 (16:32 +0200)
[ Upstream commit cfbfeee61582e638770a1a10deef866c9adb38f5 ]

This ignores errors from HCI_OP_REMOTE_NAME_REQ_CANCEL since it
shouldn't interfere with the stopping of discovery and in certain
conditions it seems to be failing.

Link: https://github.com/bluez/bluez/issues/575
Fixes: d0b137062b2d ("Bluetooth: hci_sync: Rework init stages")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_sync.c

index f4a54dbc07f19a83a1a94a224e8b6910b9d5ea65..86fee9d6c1424828a91c13779f235fe11a44551c 100644 (file)
@@ -5331,7 +5331,10 @@ int hci_stop_discovery_sync(struct hci_dev *hdev)
                if (!e)
                        return 0;
 
-               return hci_remote_name_cancel_sync(hdev, &e->data.bdaddr);
+               /* Ignore cancel errors since it should interfere with stopping
+                * of the discovery.
+                */
+               hci_remote_name_cancel_sync(hdev, &e->data.bdaddr);
        }
 
        return 0;