fix device_lock/device_unlock imbalance in the hotplug device handling