From: Dan Carpenter <error27@xxxxxxxxx> As the struct configfs_item_operations target_core_dev_item_ops->release() callback will never be null from fs/configfs/item.c:config_item_cleanup(), this NULL pointer check is unnecessary. Signed-off-by: Dan Carpenter <error27@xxxxxxxxx> Signed-off-by: Nicholas A. Bellinger <nab@xxxxxxxxxxxxxxx> (cherry picked from commit 6e9af570076fb3ad4fb7442a8243271f08779c45) --- drivers/target/target_core_configfs.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 99e07ba..30ae3af 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -2003,12 +2003,8 @@ static void target_core_dev_release(struct config_item *item) { struct se_subsystem_dev *se_dev = container_of(to_config_group(item), struct se_subsystem_dev, se_dev_group); - struct config_group *dev_cg; + struct config_group *dev_cg = &se_dev->se_dev_group; - if (!(se_dev)) - return; - - dev_cg = &se_dev->se_dev_group; kfree(dev_cg->default_groups); } -- 1.7.3.5 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html