]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - kernel/trace/trace_events_filter.c
treewide: kmalloc() -> kmalloc_array()
[mirror_ubuntu-hirsute-kernel.git] / kernel / trace / trace_events_filter.c
index 0171407d231f6219af55632fe32ef284c87e366c..e1c818dbc0d724c603be39463b83de8f021cf79f 100644 (file)
@@ -436,15 +436,15 @@ predicate_parse(const char *str, int nr_parens, int nr_preds,
 
        nr_preds += 2; /* For TRUE and FALSE */
 
-       op_stack = kmalloc(sizeof(*op_stack) * nr_parens, GFP_KERNEL);
+       op_stack = kmalloc_array(nr_parens, sizeof(*op_stack), GFP_KERNEL);
        if (!op_stack)
                return ERR_PTR(-ENOMEM);
-       prog_stack = kmalloc(sizeof(*prog_stack) * nr_preds, GFP_KERNEL);
+       prog_stack = kmalloc_array(nr_preds, sizeof(*prog_stack), GFP_KERNEL);
        if (!prog_stack) {
                parse_error(pe, -ENOMEM, 0);
                goto out_free;
        }
-       inverts = kmalloc(sizeof(*inverts) * nr_preds, GFP_KERNEL);
+       inverts = kmalloc_array(nr_preds, sizeof(*inverts), GFP_KERNEL);
        if (!inverts) {
                parse_error(pe, -ENOMEM, 0);
                goto out_free;