clk: hisilicon: Delete an error message for a failed memory allocation in hisi_regist...
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 26 Sep 2017 20:00:05 +0000 (22:00 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Tue, 14 Nov 2017 17:49:00 +0000 (09:49 -0800)
Omit an extra message 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>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/hisilicon/clkgate-separated.c

index 7908bc3..f028bcf 100644 (file)
@@ -105,10 +105,8 @@ struct clk *hisi_register_clkgate_sep(struct device *dev, const char *name,
        struct clk_init_data init;
 
        sclk = kzalloc(sizeof(*sclk), GFP_KERNEL);
-       if (!sclk) {
-               pr_err("%s: fail to allocate separated gated clk\n", __func__);
+       if (!sclk)
                return ERR_PTR(-ENOMEM);
-       }
 
        init.name = name;
        init.ops = &clkgate_separated_ops;