diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 88675037f21f..5f60b95390e2 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -5049,12 +5049,6 @@ int hci_dev_open_sync(struct hci_dev *hdev)
 
 	bt_dev_dbg(hdev, "");
 
-	/* Set HCI_DRAIN_WORKQUEUE flag to prevent queuing work during
-	 * reset/close. See hci_cmd_work() and handle_cmd_cnt_and_timer().
-	 */
-	hci_dev_set_flag(hdev, HCI_CMD_DRAIN_WORKQUEUE);
-	synchronize_rcu();
-
 	if (hci_dev_test_flag(hdev, HCI_UNREGISTER)) {
 		ret = -ENODEV;
 		goto done;
@@ -5206,6 +5200,12 @@ int hci_dev_close_sync(struct hci_dev *hdev)
 
 	bt_dev_dbg(hdev, "");
 
+	/* Set HCI_DRAIN_WORKQUEUE flag to prevent queuing work during
+	 * reset/close. See hci_cmd_work() and handle_cmd_cnt_and_timer().
+	 */
+	hci_dev_set_flag(hdev, HCI_CMD_DRAIN_WORKQUEUE);
+	synchronize_rcu();
+
 	cancel_delayed_work(&hdev->power_off);
 	cancel_delayed_work(&hdev->ncmd_timer);
 	cancel_delayed_work(&hdev->le_scan_disable);
