summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/orangefs-debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/orangefs/orangefs-debugfs.c')
-rw-r--r--fs/orangefs/orangefs-debugfs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c
index 716ed337f166..1c59dff530de 100644
--- a/fs/orangefs/orangefs-debugfs.c
+++ b/fs/orangefs/orangefs-debugfs.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* What: /sys/kernel/debug/orangefs/debug-help
* Date: June 2015
@@ -571,11 +572,8 @@ static int orangefs_prepare_cdm_array(char *debug_array_string)
goto out;
}
- cdm_array =
- kzalloc(cdm_element_count * sizeof(struct client_debug_mask),
- GFP_KERNEL);
+ cdm_array = kcalloc(cdm_element_count, sizeof(*cdm_array), GFP_KERNEL);
if (!cdm_array) {
- pr_info("malloc failed for cdm_array!\n");
rc = -ENOMEM;
goto out;
}
OpenPOWER on IntegriCloud