From: Markus Elfring Date: Tue, 18 Apr 2017 08:12:32 +0000 (+0200) Subject: clk: hisilicon: Delete error messages for failed memory allocations in hisi_clk_init() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=840e56326fd90a435644ee0eeba99f4cddd31759;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git clk: hisilicon: Delete error messages for failed memory allocations in hisi_clk_init() The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such statements here. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/hisilicon/clk.c b/drivers/clk/hisilicon/clk.c index 7e1e22eb5689..b73c1dfae7f1 100644 --- a/drivers/clk/hisilicon/clk.c +++ b/drivers/clk/hisilicon/clk.c @@ -81,16 +81,14 @@ struct hisi_clock_data *hisi_clk_init(struct device_node *np, } clk_data = kzalloc(sizeof(*clk_data), GFP_KERNEL); - if (!clk_data) { - pr_err("%s: could not allocate clock data\n", __func__); + if (!clk_data) goto err; - } + clk_data->base = base; clk_table = kcalloc(nr_clks, sizeof(*clk_table), GFP_KERNEL); - if (!clk_table) { - pr_err("%s: could not allocate clock lookup table\n", __func__); + if (!clk_table) goto err_data; - } + clk_data->clk_data.clks = clk_table; clk_data->clk_data.clk_num = nr_clks; of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data->clk_data);