clk: versatile: Delete error messages for failed memory allocations
Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
committed by
Stephen Boyd
parent
0b10adbae3
commit
e343b81e4d
@@ -360,15 +360,12 @@ static struct clk *icst_clk_setup(struct device *dev,
|
|||||||
struct icst_params *pclone;
|
struct icst_params *pclone;
|
||||||
|
|
||||||
icst = kzalloc(sizeof(struct clk_icst), GFP_KERNEL);
|
icst = kzalloc(sizeof(struct clk_icst), GFP_KERNEL);
|
||||||
if (!icst) {
|
if (!icst)
|
||||||
pr_err("could not allocate ICST clock!\n");
|
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
}
|
|
||||||
|
|
||||||
pclone = kmemdup(desc->params, sizeof(*pclone), GFP_KERNEL);
|
pclone = kmemdup(desc->params, sizeof(*pclone), GFP_KERNEL);
|
||||||
if (!pclone) {
|
if (!pclone) {
|
||||||
kfree(icst);
|
kfree(icst);
|
||||||
pr_err("could not clone ICST params\n");
|
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user