Commit 264e3b75 authored by Axel Lin's avatar Axel Lin Committed by Stephen Boyd

clk: s2mps11: Simplify s2mps11_clk_probe unwind paths

The devm_clk_unregister() in .probe error case is not necessary as it will
be automatically called when probe fails.
Signed-off-by: default avatarAxel Lin <>
Reviewed-by: default avatarKrzysztof Kozlowski <>
Signed-off-by: default avatarStephen Boyd <>
parent 5a1cfafa
......@@ -246,7 +246,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
s2mps11_name(s2mps11_clk), NULL);
if (!s2mps11_clk->lookup) {
ret = -ENOMEM;
goto err_lup;
goto err_reg;
......@@ -265,16 +265,10 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, s2mps11_clks);
return ret;
devm_clk_unregister(&pdev->dev, s2mps11_clk->clk);
while (s2mps11_clk > s2mps11_clks) {
if (s2mps11_clk->lookup) {
devm_clk_unregister(&pdev->dev, s2mps11_clk->clk);
while (--i >= 0)
return ret;
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