diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index 37449bdd62f6..7fc5eae875de 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -1548,8 +1548,6 @@ int target_configure_device(struct se_device *dev) ret = dev->transport->configure_device(dev); if (ret) goto out; - dev->dev_flags |= DF_CONFIGURED; - /* * XXX: there is not much point to have two different values here.. */ @@ -1611,6 +1609,8 @@ int target_configure_device(struct se_device *dev) list_add_tail(&dev->g_dev_node, &g_device_list); mutex_unlock(&g_device_mutex); + dev->dev_flags |= DF_CONFIGURED; + return 0; out_free_alua: