All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: tas2552: Fix runtime PM imbalance in tas2552_component_probe
@ 2020-05-25  7:17 ` Dinghao Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Dinghao Liu @ 2020-05-25  7:17 UTC (permalink / raw)
  To: dinghao.liu, kjlu
  Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Allison Randal, Kate Stewart, Richard Fontana, Thomas Gleixner,
	alsa-devel, linux-kernel

pm_runtime_get_sync() increments the runtime PM usage counter even
when it returns an error code. Thus a pairing decrement is needed on
the error handling path to keep the counter balanced.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
---
 sound/soc/codecs/tas2552.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
index 56671f21cfe5..d90e5f2b6f27 100644
--- a/sound/soc/codecs/tas2552.c
+++ b/sound/soc/codecs/tas2552.c
@@ -602,6 +602,7 @@ static int tas2552_component_probe(struct snd_soc_component *component)
 	return 0;
 
 probe_fail:
+	pm_runtime_put_noidle(component->dev);
 	gpiod_set_value(tas2552->enable_gpio, 0);
 
 	regulator_bulk_disable(ARRAY_SIZE(tas2552->supplies),
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ASoC: tas2552: Fix runtime PM imbalance in tas2552_component_probe
@ 2020-05-25  7:17 ` Dinghao Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Dinghao Liu @ 2020-05-25  7:17 UTC (permalink / raw)
  To: dinghao.liu, kjlu
  Cc: Kate Stewart, alsa-devel, linux-kernel, Takashi Iwai,
	Liam Girdwood, Richard Fontana, Mark Brown, Thomas Gleixner,
	Allison Randal

pm_runtime_get_sync() increments the runtime PM usage counter even
when it returns an error code. Thus a pairing decrement is needed on
the error handling path to keep the counter balanced.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
---
 sound/soc/codecs/tas2552.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
index 56671f21cfe5..d90e5f2b6f27 100644
--- a/sound/soc/codecs/tas2552.c
+++ b/sound/soc/codecs/tas2552.c
@@ -602,6 +602,7 @@ static int tas2552_component_probe(struct snd_soc_component *component)
 	return 0;
 
 probe_fail:
+	pm_runtime_put_noidle(component->dev);
 	gpiod_set_value(tas2552->enable_gpio, 0);
 
 	regulator_bulk_disable(ARRAY_SIZE(tas2552->supplies),
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: tas2552: Fix runtime PM imbalance in tas2552_component_probe
  2020-05-25  7:17 ` Dinghao Liu
@ 2020-05-26 16:45   ` Mark Brown
  -1 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2020-05-26 16:45 UTC (permalink / raw)
  To: kjlu, Dinghao Liu
  Cc: Liam Girdwood, linux-kernel, Kate Stewart, Allison Randal,
	alsa-devel, Richard Fontana, Thomas Gleixner, Takashi Iwai

On Mon, 25 May 2020 15:17:30 +0800, Dinghao Liu wrote:
> pm_runtime_get_sync() increments the runtime PM usage counter even
> when it returns an error code. Thus a pairing decrement is needed on
> the error handling path to keep the counter balanced.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: tas2552: Fix runtime PM imbalance in tas2552_component_probe
      commit: 0d71a5cf691a8226151ceeb79fb872925f053df5

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: tas2552: Fix runtime PM imbalance in tas2552_component_probe
@ 2020-05-26 16:45   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2020-05-26 16:45 UTC (permalink / raw)
  To: kjlu, Dinghao Liu
  Cc: Kate Stewart, alsa-devel, Takashi Iwai, Liam Girdwood,
	linux-kernel, Richard Fontana, Thomas Gleixner, Allison Randal

On Mon, 25 May 2020 15:17:30 +0800, Dinghao Liu wrote:
> pm_runtime_get_sync() increments the runtime PM usage counter even
> when it returns an error code. Thus a pairing decrement is needed on
> the error handling path to keep the counter balanced.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: tas2552: Fix runtime PM imbalance in tas2552_component_probe
      commit: 0d71a5cf691a8226151ceeb79fb872925f053df5

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-26 16:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25  7:17 [PATCH] ASoC: tas2552: Fix runtime PM imbalance in tas2552_component_probe Dinghao Liu
2020-05-25  7:17 ` Dinghao Liu
2020-05-26 16:45 ` Mark Brown
2020-05-26 16:45   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.