Commit 8002cab6 authored by Emil Medve's avatar Emil Medve Committed by Michael Turquette

clk: qoriq: Fix checkpatch type OOM_MESSAGE

WARNING:OOM_MESSAGE: Possible unnecessary 'out of memory' message
+       if (!parent_names) {
+               pr_err("%s: could not allocate parent_names\n", __func__);

WARNING:OOM_MESSAGE: Possible unnecessary 'out of memory' message
+       if (!cmux_clk) {
+               pr_err("%s: could not allocate cmux_clk\n", __func__);

WARNING:OOM_MESSAGE: Possible unnecessary 'out of memory' message
+       if (!subclks) {
+               pr_err("%s: could not allocate subclks\n", __func__);

WARNING:OOM_MESSAGE: Possible unnecessary 'out of memory' message
+       if (!onecell_data) {
+               pr_err("%s: could not allocate onecell_data\n", __func__);
Signed-off-by: default avatarEmil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: default avatarMichael Turquette <mturquette@linaro.org>
parent 13c25f57
...@@ -86,19 +86,16 @@ static void __init core_mux_init(struct device_node *np) ...@@ -86,19 +86,16 @@ static void __init core_mux_init(struct device_node *np)
return; return;
} }
parent_names = kcalloc(count, sizeof(char *), 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__);
return; return;
}
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
parent_names[i] = of_clk_get_parent_name(np, i); parent_names[i] = of_clk_get_parent_name(np, i);
cmux_clk = kzalloc(sizeof(*cmux_clk), GFP_KERNEL); cmux_clk = kzalloc(sizeof(*cmux_clk), GFP_KERNEL);
if (!cmux_clk) { if (!cmux_clk)
pr_err("%s: could not allocate cmux_clk\n", __func__);
goto err_name; goto err_name;
}
cmux_clk->reg = of_iomap(np, 0); cmux_clk->reg = of_iomap(np, 0);
if (!cmux_clk->reg) { if (!cmux_clk->reg) {
pr_err("%s: could not map register\n", __func__); pr_err("%s: could not map register\n", __func__);
...@@ -193,16 +190,12 @@ static void __init core_pll_init(struct device_node *np) ...@@ -193,16 +190,12 @@ static void __init core_pll_init(struct device_node *np)
} }
subclks = kcalloc(count, sizeof(struct clk *), GFP_KERNEL); subclks = kcalloc(count, sizeof(struct clk *), GFP_KERNEL);
if (!subclks) { if (!subclks)
pr_err("%s: could not allocate subclks\n", __func__);
goto err_map; goto err_map;
}
onecell_data = kzalloc(sizeof(*onecell_data), GFP_KERNEL); onecell_data = kzalloc(sizeof(*onecell_data), GFP_KERNEL);
if (!onecell_data) { if (!onecell_data)
pr_err("%s: could not allocate onecell_data\n", __func__);
goto err_clks; goto err_clks;
}
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
rc = of_property_read_string_index(np, "clock-output-names", rc = of_property_read_string_index(np, "clock-output-names",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment