OSDN Git Service

clk: versatile: Delete error messages for failed memory allocations
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 27 Sep 2017 19:21:23 +0000 (21:21 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Tue, 14 Nov 2017 01:42:44 +0000 (17:42 -0800)
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>
drivers/clk/versatile/clk-icst.c

index 09fbe66..20ab4ce 100644 (file)
@@ -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);
        }