diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2012-11-27 18:54:21 +0100 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-11-27 22:49:24 -0800 |
commit | 13f6a91479b06133eb99f1f43be02608eb867313 (patch) | |
tree | 721d72ee5d17995c8697e3dbdab5401ba9025069 /drivers/target/target_core_fabric_configfs.c | |
parent | a5675c8a8b72efdd09ccd1b0975c4670675775ef (diff) | |
download | op-kernel-dev-13f6a91479b06133eb99f1f43be02608eb867313.zip op-kernel-dev-13f6a91479b06133eb99f1f43be02608eb867313.tar.gz |
target/configfs: use kmalloc() instead of kzalloc() for default groups
All elements are assigned even the NULL member at the end so there is no
reason to allocate zeroed memory.
(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_fabric_configfs.c')
-rw-r--r-- | drivers/target/target_core_fabric_configfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c index efe31a0..9c67917 100644 --- a/drivers/target/target_core_fabric_configfs.c +++ b/drivers/target/target_core_fabric_configfs.c @@ -357,7 +357,7 @@ static struct config_group *target_fabric_make_mappedlun( } lacl_cg = &lacl->se_lun_group; - lacl_cg->default_groups = kzalloc(sizeof(struct config_group *) * 2, + lacl_cg->default_groups = kmalloc(sizeof(struct config_group *) * 2, GFP_KERNEL); if (!lacl_cg->default_groups) { pr_err("Unable to allocate lacl_cg->default_groups\n"); @@ -373,7 +373,7 @@ static struct config_group *target_fabric_make_mappedlun( lacl_cg->default_groups[1] = NULL; ml_stat_grp = &lacl->ml_stat_grps.stat_group; - ml_stat_grp->default_groups = kzalloc(sizeof(struct config_group *) * 3, + ml_stat_grp->default_groups = kmalloc(sizeof(struct config_group *) * 3, GFP_KERNEL); if (!ml_stat_grp->default_groups) { pr_err("Unable to allocate ml_stat_grp->default_groups\n"); @@ -858,7 +858,7 @@ static struct config_group *target_fabric_make_lun( return ERR_PTR(-EINVAL); lun_cg = &lun->lun_group; - lun_cg->default_groups = kzalloc(sizeof(struct config_group *) * 2, + lun_cg->default_groups = kmalloc(sizeof(struct config_group *) * 2, GFP_KERNEL); if (!lun_cg->default_groups) { pr_err("Unable to allocate lun_cg->default_groups\n"); |