summaryrefslogtreecommitdiff
path: root/drivers/target/target_core_configfs.c
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2013-12-09 14:27:36 -0800
committerNicholas Bellinger <nab@linux-iscsi.org>2013-12-16 12:42:20 -0800
commitab6dae8236767f9815bb00c29a56d045e33cd470 (patch)
tree906d426063e3a19ed2ed62803ba6319ff7a6123e /drivers/target/target_core_configfs.c
parent3f0ed57b26ddd6358b4ab2b9bde652fd683fe02d (diff)
target: Fix sizeof in kmalloc for some default_groups arrays
Allocating an array of pointers, not the objects themselves. These two sites now match all the other sites. Signed-off-by: Andy Grover <agrover@redhat.com> 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
index 272755d03e5a..a1c23d10468e 100644
--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -2937,7 +2937,7 @@ static int __init target_core_init_configfs(void)
* and ALUA Logical Unit Group and Target Port Group infrastructure.
*/
target_cg = &subsys->su_group;
- target_cg->default_groups = kmalloc(sizeof(struct config_group) * 2,
+ target_cg->default_groups = kmalloc(sizeof(struct config_group *) * 2,
GFP_KERNEL);
if (!target_cg->default_groups) {
pr_err("Unable to allocate target_cg->default_groups\n");