linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] clk: mvebu: armada-37xx-tbg: Remove the unneeded result variable
@ 2022-09-06  7:23 cgel.zte
  2022-10-01  0:46 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-09-06  7:23 UTC (permalink / raw)
  To: sboyd; +Cc: mturquette, linux-clk, linux-kernel, ye xingchen, Zeal Robot

From: ye xingchen <ye.xingchen@zte.com.cn>

Return the value of_clk_add_hw_provider() directly instead of storing it
in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 drivers/clk/mvebu/armada-37xx-tbg.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/mvebu/armada-37xx-tbg.c b/drivers/clk/mvebu/armada-37xx-tbg.c
index 585a02e0b330..fc403ad735ad 100644
--- a/drivers/clk/mvebu/armada-37xx-tbg.c
+++ b/drivers/clk/mvebu/armada-37xx-tbg.c
@@ -87,7 +87,7 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev)
 	struct resource *res;
 	struct clk *parent;
 	void __iomem *reg;
-	int i, ret;
+	int i;
 
 	hw_tbg_data = devm_kzalloc(&pdev->dev,
 				   struct_size(hw_tbg_data, hws, NUM_TBG),
@@ -123,9 +123,7 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev)
 			dev_err(dev, "Can't register TBG clock %s\n", name);
 	}
 
-	ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, hw_tbg_data);
-
-	return ret;
+	return of_clk_add_hw_provider(np, of_clk_hw_onecell_get, hw_tbg_data);
 }
 
 static int armada_3700_tbg_clock_remove(struct platform_device *pdev)
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH linux-next] clk: mvebu: armada-37xx-tbg: Remove the unneeded result variable
  2022-09-06  7:23 [PATCH linux-next] clk: mvebu: armada-37xx-tbg: Remove the unneeded result variable cgel.zte
@ 2022-10-01  0:46 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2022-10-01  0:46 UTC (permalink / raw)
  To: cgel.zte; +Cc: mturquette, linux-clk, linux-kernel, ye xingchen, Zeal Robot

Quoting cgel.zte@gmail.com (2022-09-06 00:23:22)
> From: ye xingchen <ye.xingchen@zte.com.cn>
> 
> Return the value of_clk_add_hw_provider() directly instead of storing it
> in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-01  0:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-06  7:23 [PATCH linux-next] clk: mvebu: armada-37xx-tbg: Remove the unneeded result variable cgel.zte
2022-10-01  0:46 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).