aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorye xingchen <[email protected]>2022-09-06 07:23:22 +0000
committerStephen Boyd <[email protected]>2022-09-30 17:46:30 -0700
commitf816ac1115b9d4f874efa04f721eba99cf69067e (patch)
treed7d4730f86b4d5f9b539d95d0c163f5d2beaec8b
parent9c59a01caba26ec06fefd6ca1f22d5fd1de57d63 (diff)
clk: mvebu: armada-37xx-tbg: Remove the unneeded result variable
Return the value of_clk_add_hw_provider() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot <[email protected]> Signed-off-by: ye xingchen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
-rw-r--r--drivers/clk/mvebu/armada-37xx-tbg.c6
1 files 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)