aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/target/target_core_configfs.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
index a1b41715464a..015f5be27bf6 100644
--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -3124,6 +3124,7 @@ static int __init target_core_init_configfs(void)
3124 GFP_KERNEL); 3124 GFP_KERNEL);
3125 if (!target_cg->default_groups) { 3125 if (!target_cg->default_groups) {
3126 pr_err("Unable to allocate target_cg->default_groups\n"); 3126 pr_err("Unable to allocate target_cg->default_groups\n");
3127 ret = -ENOMEM;
3127 goto out_global; 3128 goto out_global;
3128 } 3129 }
3129 3130
@@ -3139,6 +3140,7 @@ static int __init target_core_init_configfs(void)
3139 GFP_KERNEL); 3140 GFP_KERNEL);
3140 if (!hba_cg->default_groups) { 3141 if (!hba_cg->default_groups) {
3141 pr_err("Unable to allocate hba_cg->default_groups\n"); 3142 pr_err("Unable to allocate hba_cg->default_groups\n");
3143 ret = -ENOMEM;
3142 goto out_global; 3144 goto out_global;
3143 } 3145 }
3144 config_group_init_type_name(&alua_group, 3146 config_group_init_type_name(&alua_group,
@@ -3154,6 +3156,7 @@ static int __init target_core_init_configfs(void)
3154 GFP_KERNEL); 3156 GFP_KERNEL);
3155 if (!alua_cg->default_groups) { 3157 if (!alua_cg->default_groups) {
3156 pr_err("Unable to allocate alua_cg->default_groups\n"); 3158 pr_err("Unable to allocate alua_cg->default_groups\n");
3159 ret = -ENOMEM;
3157 goto out_global; 3160 goto out_global;
3158 } 3161 }
3159 3162
@@ -3165,14 +3168,17 @@ static int __init target_core_init_configfs(void)
3165 * Add core/alua/lu_gps/default_lu_gp 3168 * Add core/alua/lu_gps/default_lu_gp
3166 */ 3169 */
3167 lu_gp = core_alua_allocate_lu_gp("default_lu_gp", 1); 3170 lu_gp = core_alua_allocate_lu_gp("default_lu_gp", 1);
3168 if (IS_ERR(lu_gp)) 3171 if (IS_ERR(lu_gp)) {
3172 ret = -ENOMEM;
3169 goto out_global; 3173 goto out_global;
3174 }
3170 3175
3171 lu_gp_cg = &alua_lu_gps_group; 3176 lu_gp_cg = &alua_lu_gps_group;
3172 lu_gp_cg->default_groups = kzalloc(sizeof(struct config_group) * 2, 3177 lu_gp_cg->default_groups = kzalloc(sizeof(struct config_group) * 2,
3173 GFP_KERNEL); 3178 GFP_KERNEL);
3174 if (!lu_gp_cg->default_groups) { 3179 if (!lu_gp_cg->default_groups) {
3175 pr_err("Unable to allocate lu_gp_cg->default_groups\n"); 3180 pr_err("Unable to allocate lu_gp_cg->default_groups\n");
3181 ret = -ENOMEM;
3176 goto out_global; 3182 goto out_global;
3177 } 3183 }
3178 3184