diff options
-rw-r--r-- | drivers/target/target_core_user.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index e080cd1a8fde..d10aa0ac0918 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c @@ -1593,11 +1593,9 @@ static void tcmu_destroy_device(struct se_device *dev) tcmu_blocks_release(udev); - if (tcmu_dev_configured(udev)) { - tcmu_netlink_event(udev, TCMU_CMD_REMOVED_DEVICE, 0, NULL); + tcmu_netlink_event(udev, TCMU_CMD_REMOVED_DEVICE, 0, NULL); - uio_unregister_device(&udev->uio_info); - } + uio_unregister_device(&udev->uio_info); } enum { |