提交 a9247225 编写于 作者: E Emil Medve 提交者: Michael Turquette

clk: qoriq: Fix checkpatch type ALLOC_WITH_MULTIPLY

WARNING:ALLOC_WITH_MULTIPLY: Prefer kcalloc over kzalloc with multiply
+       subclks = kzalloc(sizeof(struct clk *) * count, GFP_KERNEL);
Signed-off-by: NEmil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: NMichael Turquette <mturquette@linaro.org>
上级 78f4a63e
...@@ -85,7 +85,7 @@ static void __init core_mux_init(struct device_node *np) ...@@ -85,7 +85,7 @@ static void __init core_mux_init(struct device_node *np)
pr_err("%s: get clock count error\n", np->name); pr_err("%s: get clock count error\n", np->name);
return; return;
} }
parent_names = kzalloc((sizeof(char *) * count), GFP_KERNEL); parent_names = kcalloc(count, sizeof(char *), GFP_KERNEL);
if (!parent_names) { if (!parent_names) {
pr_err("%s: could not allocate parent_names\n", __func__); pr_err("%s: could not allocate parent_names\n", __func__);
return; return;
...@@ -192,7 +192,7 @@ static void __init core_pll_init(struct device_node *np) ...@@ -192,7 +192,7 @@ static void __init core_pll_init(struct device_node *np)
goto err_map; goto err_map;
} }
subclks = kzalloc(sizeof(struct clk *) * count, GFP_KERNEL); subclks = kcalloc(count, sizeof(struct clk *), GFP_KERNEL);
if (!subclks) { if (!subclks) {
pr_err("%s: could not allocate subclks\n", __func__); pr_err("%s: could not allocate subclks\n", __func__);
goto err_map; goto err_map;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册