Browse Source

clk: ti: Delete error messages for failed memory allocations

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>
Markus Elfring 7 năm trước cách đây
mục cha
commit
f80c8a29f9
2 tập tin đã thay đổi với 2 bổ sung6 xóa
  1. 1 3
      drivers/clk/ti/divider.c
  2. 1 3
      drivers/clk/ti/mux.c

+ 1 - 3
drivers/clk/ti/divider.c

@@ -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;

+ 1 - 3
drivers/clk/ti/mux.c

@@ -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;