clk: unlock for handling unregistered clock
authorInsu Yun <wuninsu@gmail.com>
Sat, 30 Jan 2016 15:12:04 +0000 (10:12 -0500)
committerStephen Boyd <sboyd@codeaurora.org>
Tue, 2 Feb 2016 19:54:07 +0000 (11:54 -0800)
If clock is already unregistered, it returns with holding lock.
It needs to be unlocked.

Signed-off-by: Insu Yun <wuninsu@gmail.com>
[sboyd@codeaurora.org: Use goto instead]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk.c

index d31ed95d27a46d1f25a49d63b07a64d181aa0201..bb01ed6cc63e4876d4c38ddb5562b7eeb59375da 100644 (file)
@@ -2641,7 +2641,7 @@ void clk_unregister(struct clk *clk)
        if (clk->core->ops == &clk_nodrv_ops) {
                pr_err("%s: unregistered clock: %s\n", __func__,
                       clk->core->name);
-               return;
+               goto unlock;
        }
        /*
         * Assign empty clock ops for consumers that might still hold
@@ -2667,7 +2667,7 @@ void clk_unregister(struct clk *clk)
                pr_warn("%s: unregistering prepared clock: %s\n",
                                        __func__, clk->core->name);
        kref_put(&clk->core->ref, __clk_release);
-
+unlock:
        clk_prepare_unlock();
 }
 EXPORT_SYMBOL_GPL(clk_unregister);