Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65147846 authored by Fabio Estevam's avatar Fabio Estevam Committed by Mark Brown
Browse files

ASoC: wm8962: Disable clock if wm8962_runtime_resume() fails



When regulator_bulk_enable() fails inside wm8962_runtime_resume(),
we should disable the previously enabled clock.

Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f55532a0
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -3800,7 +3800,7 @@ static int wm8962_runtime_resume(struct device *dev)
	if (ret != 0) {
		dev_err(dev,
			"Failed to enable supplies: %d\n", ret);
		return ret;
		goto disable_clock;
	}

	regcache_cache_only(wm8962->regmap, false);
@@ -3838,6 +3838,10 @@ static int wm8962_runtime_resume(struct device *dev)
	msleep(5);

	return 0;

disable_clock:
	clk_disable_unprepare(wm8962->pdata.mclk);
	return ret;
}

static int wm8962_runtime_suspend(struct device *dev)