summaryrefslogtreecommitdiff
path: root/lib/string_helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/string_helpers.c')
-rw-r--r--lib/string_helpers.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/string_helpers.c b/lib/string_helpers.c
index ffb8ead6d4cd..169eaf583494 100644
--- a/lib/string_helpers.c
+++ b/lib/string_helpers.c
@@ -13,6 +13,7 @@
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/fs.h>
+#include <linux/hex.h>
#include <linux/limits.h>
#include <linux/mm.h>
#include <linux/slab.h>
@@ -146,7 +147,7 @@ int parse_int_array(const char *buf, size_t count, int **array)
if (!nints)
return -ENOENT;
- ints = kcalloc(nints + 1, sizeof(*ints), GFP_KERNEL);
+ ints = kzalloc_objs(*ints, nints + 1);
if (!ints)
return -ENOMEM;