clk/ti: Delete an error message for a failed memory allocation in two functions
Subsystems (3)
PATCH 1/1 clk/ti: Delete an error message for a failed memory allocation in two functions
From: Markus Elfring <[email protected]>
Date: Wed, 27 Sep 2017 19:14:01 +0200
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 <[email protected]>
--- drivers/clk/ti/divider.c | 4 +--- drivers/clk/ti/mux.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/clk/ti/divider.c +1 -3
@@ -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;
drivers/clk/ti/mux.c +1 -3
@@ -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;
Signature · 1 line
2.14.2
Stephen Boyd
AppliedQuoted 9 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Wed, 27 Sep 2017 19:14:01 +0200Omit extra messages for a memory allocation failure in these functions.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>---
Applied to clk-next
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project