From: Mike Christie Date: Fri, 23 Jun 2017 06:18:19 +0000 (-0500) Subject: tcmu: drop configured check in destroy X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=531283ff7593f7059ced43c725d90cec3e5af549;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Nicholas Bellinger --- 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 {