diff options
Diffstat (limited to 'drivers/target/target_core_fabric_configfs.c')
-rw-r--r-- | drivers/target/target_core_fabric_configfs.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c index bca737bb813d..aa6731337f84 100644 --- a/drivers/target/target_core_fabric_configfs.c +++ b/drivers/target/target_core_fabric_configfs.c @@ -734,14 +734,12 @@ static int target_fabric_port_link( struct config_item *se_dev_ci) { struct config_item *tpg_ci; - struct se_device *dev; struct se_lun *lun = container_of(to_config_group(lun_ci), struct se_lun, lun_group); struct se_lun *lun_p; struct se_portal_group *se_tpg; - struct se_subsystem_dev *se_dev = container_of( - to_config_group(se_dev_ci), struct se_subsystem_dev, - se_dev_group); + struct se_device *dev = + container_of(to_config_group(se_dev_ci), struct se_device, dev_group); struct target_fabric_configfs *tf; int ret; @@ -755,14 +753,6 @@ static int target_fabric_port_link( return -EEXIST; } - dev = se_dev->se_dev_ptr; - if (!dev) { - pr_err("Unable to locate struct se_device pointer from" - " %s\n", config_item_name(se_dev_ci)); - ret = -ENODEV; - goto out; - } - lun_p = core_dev_add_lun(se_tpg, dev, lun->unpacked_lun); if (IS_ERR(lun_p)) { pr_err("core_dev_add_lun() failed\n"); |