Commit 63b1a5d7 authored by Markus Elfring's avatar Markus Elfring Committed by Stephen Boyd

clk: spear: Delete error messages for failed memory allocations

Omit extra messages for a memory allocation failure in these
functions.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent f80c8a29
...@@ -149,10 +149,8 @@ struct clk *clk_register_aux(const char *aux_name, const char *gate_name, ...@@ -149,10 +149,8 @@ struct clk *clk_register_aux(const char *aux_name, const char *gate_name,
} }
aux = kzalloc(sizeof(*aux), GFP_KERNEL); aux = kzalloc(sizeof(*aux), GFP_KERNEL);
if (!aux) { if (!aux)
pr_err("could not allocate aux clk\n");
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
}
/* struct clk_aux assignments */ /* struct clk_aux assignments */
if (!masks) if (!masks)
......
...@@ -136,10 +136,8 @@ struct clk *clk_register_frac(const char *name, const char *parent_name, ...@@ -136,10 +136,8 @@ struct clk *clk_register_frac(const char *name, const char *parent_name,
} }
frac = kzalloc(sizeof(*frac), GFP_KERNEL); frac = kzalloc(sizeof(*frac), GFP_KERNEL);
if (!frac) { if (!frac)
pr_err("could not allocate frac clk\n");
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
}
/* struct clk_frac assignments */ /* struct clk_frac assignments */
frac->reg = reg; frac->reg = reg;
......
...@@ -125,10 +125,8 @@ struct clk *clk_register_gpt(const char *name, const char *parent_name, unsigned ...@@ -125,10 +125,8 @@ struct clk *clk_register_gpt(const char *name, const char *parent_name, unsigned
} }
gpt = kzalloc(sizeof(*gpt), GFP_KERNEL); gpt = kzalloc(sizeof(*gpt), GFP_KERNEL);
if (!gpt) { if (!gpt)
pr_err("could not allocate gpt clk\n");
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
}
/* struct clk_gpt assignments */ /* struct clk_gpt assignments */
gpt->reg = reg; gpt->reg = reg;
......
...@@ -292,16 +292,12 @@ struct clk *clk_register_vco_pll(const char *vco_name, const char *pll_name, ...@@ -292,16 +292,12 @@ struct clk *clk_register_vco_pll(const char *vco_name, const char *pll_name,
} }
vco = kzalloc(sizeof(*vco), GFP_KERNEL); vco = kzalloc(sizeof(*vco), GFP_KERNEL);
if (!vco) { if (!vco)
pr_err("could not allocate vco clk\n");
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
}
pll = kzalloc(sizeof(*pll), GFP_KERNEL); pll = kzalloc(sizeof(*pll), GFP_KERNEL);
if (!pll) { if (!pll)
pr_err("could not allocate pll clk\n");
goto free_vco; goto free_vco;
}
/* struct clk_vco assignments */ /* struct clk_vco assignments */
vco->mode_reg = mode_reg; vco->mode_reg = mode_reg;
......
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