diff options
author | Emil Medve <Emilian.Medve@Freescale.com> | 2015-01-21 05:03:24 -0500 |
---|---|---|
committer | Michael Turquette <mturquette@linaro.org> | 2015-01-28 13:11:39 -0500 |
commit | a92472259775340f082c221d80afd80877f41b2b (patch) | |
tree | 32e23d2e79016cb1d028ed1296a1ceac062cc5c1 /drivers/clk | |
parent | 78f4a63e6426b7496781055e51050b86081d68de (diff) |
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: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/clk-qoriq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/clk-qoriq.c b/drivers/clk/clk-qoriq.c index 90ff6858c900..475ce1c495e7 100644 --- a/drivers/clk/clk-qoriq.c +++ b/drivers/clk/clk-qoriq.c | |||
@@ -85,7 +85,7 @@ static void __init core_mux_init(struct device_node *np) | |||
85 | pr_err("%s: get clock count error\n", np->name); | 85 | pr_err("%s: get clock count error\n", np->name); |
86 | return; | 86 | return; |
87 | } | 87 | } |
88 | parent_names = kzalloc((sizeof(char *) * count), GFP_KERNEL); | 88 | parent_names = kcalloc(count, sizeof(char *), GFP_KERNEL); |
89 | if (!parent_names) { | 89 | if (!parent_names) { |
90 | pr_err("%s: could not allocate parent_names\n", __func__); | 90 | pr_err("%s: could not allocate parent_names\n", __func__); |
91 | return; | 91 | return; |
@@ -192,7 +192,7 @@ static void __init core_pll_init(struct device_node *np) | |||
192 | goto err_map; | 192 | goto err_map; |
193 | } | 193 | } |
194 | 194 | ||
195 | subclks = kzalloc(sizeof(struct clk *) * count, GFP_KERNEL); | 195 | subclks = kcalloc(count, sizeof(struct clk *), GFP_KERNEL); |
196 | if (!subclks) { | 196 | if (!subclks) { |
197 | pr_err("%s: could not allocate subclks\n", __func__); | 197 | pr_err("%s: could not allocate subclks\n", __func__); |
198 | goto err_map; | 198 | goto err_map; |