From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Chuhong Yuan <hslester96@gmail.com>
Cc: Timur Tabi <timur@kernel.org>, Xiubo Li <Xiubo.Lee@gmail.com>,
Fabio Estevam <festevam@gmail.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH resend] ASoC: fsl_audmix: add missed pm_runtime_disable
Date: Wed, 4 Dec 2019 18:19:56 -0800 [thread overview]
Message-ID: <20191205021955.GB1122@Asurada-Nvidia.nvidia.com> (raw)
In-Reply-To: <20191203111303.12933-1-hslester96@gmail.com>
On Tue, Dec 03, 2019 at 07:13:03PM +0800, Chuhong Yuan wrote:
> The driver forgets to call pm_runtime_disable in probe failure
> and remove.
> Add the missed calls to fix it.
>
> Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Thanks
> ---
> sound/soc/fsl/fsl_audmix.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c
> index a1db1bce330f..5faecbeb5497 100644
> --- a/sound/soc/fsl/fsl_audmix.c
> +++ b/sound/soc/fsl/fsl_audmix.c
> @@ -505,15 +505,20 @@ static int fsl_audmix_probe(struct platform_device *pdev)
> ARRAY_SIZE(fsl_audmix_dai));
> if (ret) {
> dev_err(dev, "failed to register ASoC DAI\n");
> - return ret;
> + goto err_disable_pm;
> }
>
> priv->pdev = platform_device_register_data(dev, mdrv, 0, NULL, 0);
> if (IS_ERR(priv->pdev)) {
> ret = PTR_ERR(priv->pdev);
> dev_err(dev, "failed to register platform %s: %d\n", mdrv, ret);
> + goto err_disable_pm;
> }
>
> + return 0;
> +
> +err_disable_pm:
> + pm_runtime_disable(dev);
> return ret;
> }
>
> @@ -521,6 +526,8 @@ static int fsl_audmix_remove(struct platform_device *pdev)
> {
> struct fsl_audmix *priv = dev_get_drvdata(&pdev->dev);
>
> + pm_runtime_disable(&pdev->dev);
> +
> if (priv->pdev)
> platform_device_unregister(priv->pdev);
>
> --
> 2.24.0
>
prev parent reply other threads:[~2019-12-05 2:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-03 11:13 Chuhong Yuan
2019-12-05 2:19 ` Nicolin Chen [this message]
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=20191205021955.GB1122@Asurada-Nvidia.nvidia.com \
--to=nicoleotsuka@gmail.com \
--cc=Xiubo.Lee@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=hslester96@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=perex@perex.cz \
--cc=timur@kernel.org \
--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
all inboxes | Powered by JetHome®