Merge tag 'sched-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / drivers / bluetooth / hci_serdev.c
index ef96ad0..9e03402 100644 (file)
@@ -83,9 +83,9 @@ static void hci_uart_write_work(struct work_struct *work)
                        hci_uart_tx_complete(hu, hci_skb_pkt_type(skb));
                        kfree_skb(skb);
                }
-       } while (test_bit(HCI_UART_TX_WAKEUP, &hu->tx_state));
 
-       clear_bit(HCI_UART_SENDING, &hu->tx_state);
+               clear_bit(HCI_UART_SENDING, &hu->tx_state);
+       } while (test_bit(HCI_UART_TX_WAKEUP, &hu->tx_state));
 }
 
 /* ------- Interface to HCI layer ------ */