Only slots 0-5 are used so 6 slots should be enough. I don't see anyone writting anything else than NULL into ->default_groups[5] so a "late" initialisation should not happen here. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> --- drivers/target/target_core_configfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 82a5af3..cd27192 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -2760,7 +2760,7 @@ static struct config_group *target_core_make_subdev( se_dev->se_dev_hba = hba; dev_cg = &se_dev->se_dev_group; - dev_cg->default_groups = kzalloc(sizeof(struct config_group *) * 7, + dev_cg->default_groups = kzalloc(sizeof(struct config_group *) * 6, GFP_KERNEL); if (!dev_cg->default_groups) goto out; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html