summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorMike Christie <mchristi@redhat.com>2017-06-23 01:18:19 -0500
committerNicholas Bellinger <nab@linux-iscsi.org>2017-07-06 23:11:41 -0700
commit531283ff7593f7059ced43c725d90cec3e5af549 (patch)
treec25c7d9f9ed9ca3ce4efb57efc4d06a8b45f5c3b /drivers/target
parentbe50f538e9a5081c61a78faf58c5591c94064633 (diff)
downloadlinux-stable-531283ff7593f7059ced43c725d90cec3e5af549.tar.gz
linux-stable-531283ff7593f7059ced43c725d90cec3e5af549.tar.bz2
linux-stable-531283ff7593f7059ced43c725d90cec3e5af549.zip
tcmu: drop configured check in destroy
destroy_device is only called if we have successfully run configure_device, so drop the duplicate tcmu_dev_configured check. Signed-off-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_user.c6
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 {