Skip to content

Commit

Permalink
target/configfs: allocate only 6 slots for dev_cg->default_groups
Browse files Browse the repository at this point in the history
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.

(nab: Fix up minor apply breakage in for-next)

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Sebastian Andrzej Siewior authored and Nicholas Bellinger committed Nov 28, 2012
1 parent 1c98d2f commit a5675c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/target/target_core_configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2496,7 +2496,7 @@ static struct config_group *target_core_make_subdev(

dev_cg = &dev->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_free_device;
Expand Down

0 comments on commit a5675c8

Please sign in to comment.