Commit f816ac11 authored by ye xingchen's avatar ye xingchen Committed by Stephen Boyd

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: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/20220906072322.337253-1-ye.xingchen@zte.com.cnSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 9c59a01c
...@@ -87,7 +87,7 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev) ...@@ -87,7 +87,7 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev)
struct resource *res; struct resource *res;
struct clk *parent; struct clk *parent;
void __iomem *reg; void __iomem *reg;
int i, ret; int i;
hw_tbg_data = devm_kzalloc(&pdev->dev, hw_tbg_data = devm_kzalloc(&pdev->dev,
struct_size(hw_tbg_data, hws, NUM_TBG), struct_size(hw_tbg_data, hws, NUM_TBG),
...@@ -123,9 +123,7 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev) ...@@ -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); 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 of_clk_add_hw_provider(np, of_clk_hw_onecell_get, hw_tbg_data);
return ret;
} }
static int armada_3700_tbg_clock_remove(struct platform_device *pdev) static int armada_3700_tbg_clock_remove(struct platform_device *pdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment