From: Markus Elfring Date: Wed, 27 Sep 2017 19:21:23 +0000 (+0200) Subject: clk: versatile: Delete error messages for failed memory allocations X-Git-Tag: v4.15-rc1~48^2^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e343b81e4d9d1551ec3a651a7d30630a268fd35e;p=thirdparty%2Fkernel%2Flinux.git 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 Acked-by: Linus Walleij Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/versatile/clk-icst.c b/drivers/clk/versatile/clk-icst.c index 09fbe66f1f11c..20ab4ceffb28a 100644 --- a/drivers/clk/versatile/clk-icst.c +++ b/drivers/clk/versatile/clk-icst.c @@ -360,15 +360,12 @@ static struct clk *icst_clk_setup(struct device *dev, struct icst_params *pclone; icst = kzalloc(sizeof(struct clk_icst), GFP_KERNEL); - if (!icst) { - pr_err("could not allocate ICST clock!\n"); + if (!icst) return ERR_PTR(-ENOMEM); - } pclone = kmemdup(desc->params, sizeof(*pclone), GFP_KERNEL); if (!pclone) { kfree(icst); - pr_err("could not clone ICST params\n"); return ERR_PTR(-ENOMEM); }