[go: nahoru, domu]

Skip to content

Commit

Permalink
clk: hisilicon: Delete an error message for a failed memory allocatio…
Browse files Browse the repository at this point in the history
…n in hisi_register_clkgate_sep()

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>
  • Loading branch information
elfring authored and bebarino committed Nov 14, 2017
1 parent d33fb1b commit 90c4209
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/clk/hisilicon/clkgate-separated.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 90c4209

Please sign in to comment.