diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2012-11-27 20:49:44 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-11-28 01:49:23 -0500 |
commit | a5675c8a8b72efdd09ccd1b0975c4670675775ef (patch) | |
tree | ac086820e4140188a84468d8cd34133b6221c268 /drivers/target/target_core_configfs.c | |
parent | 1c98d2f439f3f945c5040fd648d817e86314f2fa (diff) |
target/configfs: allocate only 6 slots for dev_cg->default_groups
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>
Diffstat (limited to 'drivers/target/target_core_configfs.c')
-rw-r--r-- | drivers/target/target_core_configfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 02fd55d3a76e..f6fc258b9d40 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c | |||
@@ -2496,7 +2496,7 @@ static struct config_group *target_core_make_subdev( | |||
2496 | 2496 | ||
2497 | dev_cg = &dev->dev_group; | 2497 | dev_cg = &dev->dev_group; |
2498 | 2498 | ||
2499 | dev_cg->default_groups = kzalloc(sizeof(struct config_group *) * 7, | 2499 | dev_cg->default_groups = kzalloc(sizeof(struct config_group *) * 6, |
2500 | GFP_KERNEL); | 2500 | GFP_KERNEL); |
2501 | if (!dev_cg->default_groups) | 2501 | if (!dev_cg->default_groups) |
2502 | goto out_free_device; | 2502 | goto out_free_device; |