]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
clk: ti: Delete error messages for failed memory allocations
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 27 Sep 2017 17:14:01 +0000 (19:14 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Tue, 14 Nov 2017 01:41:38 +0000 (17:41 -0800)
Omit extra messages for a memory allocation failure in these
functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/ti/divider.c
drivers/clk/ti/mux.c

index 88f04a4cb890be4f68025d04d4bfaec4597dfda7..77f93f6d2806a19662b3f2c94128ee491cfc4fe2 100644 (file)
@@ -292,10 +292,8 @@ static struct clk *_register_divider(struct device *dev, const char *name,
 
        /* allocate the divider */
        div = kzalloc(sizeof(*div), GFP_KERNEL);
-       if (!div) {
-               pr_err("%s: could not allocate divider clk\n", __func__);
+       if (!div)
                return ERR_PTR(-ENOMEM);
-       }
 
        init.name = name;
        init.ops = &ti_clk_divider_ops;
index 18c267b38461dc96ff1d5dd26f518136a342ffb3..d4705803f3d3c7f72cfdc9f969bde508c4a1197a 100644 (file)
@@ -108,10 +108,8 @@ static struct clk *_register_mux(struct device *dev, const char *name,
 
        /* allocate the mux */
        mux = kzalloc(sizeof(*mux), GFP_KERNEL);
-       if (!mux) {
-               pr_err("%s: could not allocate mux clk\n", __func__);
+       if (!mux)
                return ERR_PTR(-ENOMEM);
-       }
 
        init.name = name;
        init.ops = &ti_clk_mux_ops;