From: Mark Brown <broonie@kernel.org>
To: Olivier Moysan <olivier.moysan@foss.st.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>,
Jaroslav Kysela <perex@perex.cz>,
Liam Girdwood <lgirdwood@gmail.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Takashi Iwai <tiwai@suse.com>,
alsa-devel@alsa-project.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH 2/3] ASoC: stm32: dfsdm: add pm_runtime support for audio
Date: Thu, 18 Nov 2021 13:56:49 +0000 [thread overview]
Message-ID: <YZZboeQpqK8CwmL+@sirena.org.uk> (raw)
In-Reply-To: <20211118090035.5331-3-olivier.moysan@foss.st.com>
[-- Attachment #1: Type: text/plain, Size: 643 bytes --]
On Thu, Nov 18, 2021 at 10:00:34AM +0100, Olivier Moysan wrote:
> ret = snd_soc_add_component(component, NULL, 0);
> - if (ret < 0)
> + if (ret < 0) {
> dev_err(&pdev->dev, "%s: Failed to register PCM platform\n",
> __func__);
> + return ret;
> + }
>
> - return ret;
> + pm_runtime_enable(&pdev->dev);
Enabling runtime PM after registering the component may potentially lead
to a race where something manages to go in and starts using the device
including what should be runtime PM stuff. That'd lead to a reference
not being taken that should be. It's unlikely to actually happen but
it's better to be safe.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2021-11-18 13:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-18 9:00 [PATCH 0/3] ASoC: stm32: add pm runtime support Olivier Moysan
2021-11-18 9:00 ` [PATCH 1/3] ASoC: stm32: i2s: add pm_runtime support Olivier Moysan
2021-11-18 9:00 ` [PATCH 2/3] ASoC: stm32: dfsdm: add pm_runtime support for audio Olivier Moysan
2021-11-18 13:56 ` Mark Brown [this message]
2021-11-18 9:00 ` [PATCH 3/3] ASoC: stm32: spdifrx: add pm_runtime support Olivier Moysan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YZZboeQpqK8CwmL+@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=alsa-devel@alsa-project.org \
--cc=arnaud.pouliquen@foss.st.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=olivier.moysan@foss.st.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).