c
if (hdev == NULL || !hci_dev_valid(hdev)) {
    BT_ERR("Invalid hdev pointer");
    return;
}
msft_unregister(hdev);
