diff options
| author | Konstantin Dorfman <kdorfman@codeaurora.org> | 2015-02-12 11:23:32 +0200 |
|---|---|---|
| committer | Subhash Jadavani <subhashj@codeaurora.org> | 2016-05-31 15:26:15 -0700 |
| commit | fbd98e0c5c1b0c01d9bfb33959ae75b0cbebfaaf (patch) | |
| tree | 5734076cc83d03f2a64a1bf459e8d072ef393eda /drivers/mmc | |
| parent | a5d50c0f53bc42f6e2c37301523096a48ef857c4 (diff) | |
mmc: core: fix disable clock scaling
Disable clock scaling only when clock scaling was properly initialized.
Change-Id: I7ec45e49c5ce18ea6aef0e272e79325fa8952c5b
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Diffstat (limited to 'drivers/mmc')
| -rw-r--r-- | drivers/mmc/core/core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 23ee6dc61e09..da5927ed5772 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -3015,8 +3015,10 @@ out: */ void mmc_disable_clk_scaling(struct mmc_host *host) { - cancel_delayed_work_sync(&host->clk_scaling.work); - host->clk_scaling.enable = false; + if (host->clk_scaling.initialized) { + cancel_delayed_work_sync(&host->clk_scaling.work); + host->clk_scaling.enable = false; + } } EXPORT_SYMBOL_GPL(mmc_disable_clk_scaling); |
