c
if (hdev) {
    msft_unregister(hdev);
    hdev = NULL;  // Set to NULL after use
}
