]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
clk: ti: use kcalloc() instead of kzalloc()
authorEthan Carter Edwards <ethan@ethancedwards.com>
Mon, 30 Dec 2024 05:28:58 +0000 (05:28 +0000)
committerStephen Boyd <sboyd@kernel.org>
Mon, 6 Jan 2025 23:49:21 +0000 (15:49 -0800)
Use 2-factor multiplication argument form kcalloc() instead
of kzalloc().

Link: https://github.com/KSPP/linux/issues/162
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
Link: https://lore.kernel.org/r/xfjn4wqrhukvi45dkgkbulamq3242eijn7567vxwaxznh4ebdr@waat7u3l2mhi
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/ti/mux.c

index 216d85d6aac6c5e2adf3bfa3d7beed3299afe66a..f684fc306eccd76b4e38ff65e96114167feca392 100644 (file)
@@ -180,7 +180,7 @@ static void of_mux_clk_setup(struct device_node *node)
                pr_err("mux-clock %pOFn must have parents\n", node);
                return;
        }
-       parent_names = kzalloc((sizeof(char *) * num_parents), GFP_KERNEL);
+       parent_names = kcalloc(num_parents, sizeof(char *), GFP_KERNEL);
        if (!parent_names)
                goto cleanup;