Skip to content

Commit f816ac1

Browse files
ye xingchenbebarino
authored andcommitted
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 <zealci@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/20220906072322.337253-1-ye.xingchen@zte.com.cn Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 9c59a01 commit f816ac1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/clk/mvebu/armada-37xx-tbg.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev)
8787
struct resource *res;
8888
struct clk *parent;
8989
void __iomem *reg;
90-
int i, ret;
90+
int i;
9191

9292
hw_tbg_data = devm_kzalloc(&pdev->dev,
9393
struct_size(hw_tbg_data, hws, NUM_TBG),
@@ -123,9 +123,7 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev)
123123
dev_err(dev, "Can't register TBG clock %s\n", name);
124124
}
125125

126-
ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, hw_tbg_data);
127-
128-
return ret;
126+
return of_clk_add_hw_provider(np, of_clk_hw_onecell_get, hw_tbg_data);
129127
}
130128

131129
static int armada_3700_tbg_clock_remove(struct platform_device *pdev)

0 commit comments

Comments
 (0)