LinuxPPC-Dev Archive on lore.kernel.org
 help / color / Atom feed
From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Chuhong Yuan <hslester96@gmail.com>
Cc: alsa-devel@alsa-project.org, Timur Tabi <timur@kernel.org>,
	Xiubo Li <Xiubo.Lee@gmail.com>,
	linuxppc-dev@lists.ozlabs.org, Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Mark Brown <broonie@kernel.org>,
	Fabio Estevam <festevam@gmail.com>,
	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
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
> 

      reply index

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 publically 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

LinuxPPC-Dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linuxppc-dev/0 linuxppc-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linuxppc-dev linuxppc-dev/ https://lore.kernel.org/linuxppc-dev \
		linuxppc-dev@lists.ozlabs.org linuxppc-dev@ozlabs.org
	public-inbox-index linuxppc-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.linuxppc-dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git