linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Shengjiu Wang <shengjiu.wang@gmail.com>
To: Chancel Liu <chancel.liu@nxp.com>
Cc: alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org,
	Xiubo.Lee@gmail.com, linux-kernel@vger.kernel.org,
	tiwai@suse.com, lgirdwood@gmail.com, linux-sound@vger.kernel.org,
	perex@perex.cz, nicoleotsuka@gmail.com, broonie@kernel.org,
	festevam@gmail.com
Subject: Re: [PATCH] ASoC: fsl_rpmsg: Fix error handler with pm_runtime_enable
Date: Wed, 27 Dec 2023 18:13:51 +0800	[thread overview]
Message-ID: <CAA+D8APY3KL6+7kpeqGLm-n_gLTLHOWvMoEZxhrRH2X+9O1d-w@mail.gmail.com> (raw)
In-Reply-To: <20231225080608.967953-1-chancel.liu@nxp.com>

On Mon, Dec 25, 2023 at 4:06 PM Chancel Liu <chancel.liu@nxp.com> wrote:
>
> There is error message when defer probe happens:
>
> fsl_rpmsg rpmsg_audio: Unbalanced pm_runtime_enable!
>
> Fix the error handler with pm_runtime_enable.
>
> Fixes: b73d9e6225e8 ("ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg")
> Signed-off-by: Chancel Liu <chancel.liu@nxp.com>

Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>

Best regards
wang shengjiu
> ---
>  sound/soc/fsl/fsl_rpmsg.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_rpmsg.c b/sound/soc/fsl/fsl_rpmsg.c
> index 5c5c04ce9db7..00852f174a69 100644
> --- a/sound/soc/fsl/fsl_rpmsg.c
> +++ b/sound/soc/fsl/fsl_rpmsg.c
> @@ -238,7 +238,7 @@ static int fsl_rpmsg_probe(struct platform_device *pdev)
>         ret = devm_snd_soc_register_component(&pdev->dev, &fsl_component,
>                                               &fsl_rpmsg_dai, 1);
>         if (ret)
> -               return ret;
> +               goto err_pm_disable;
>
>         rpmsg->card_pdev = platform_device_register_data(&pdev->dev,
>                                                          "imx-audio-rpmsg",
> @@ -248,16 +248,22 @@ static int fsl_rpmsg_probe(struct platform_device *pdev)
>         if (IS_ERR(rpmsg->card_pdev)) {
>                 dev_err(&pdev->dev, "failed to register rpmsg card\n");
>                 ret = PTR_ERR(rpmsg->card_pdev);
> -               return ret;
> +               goto err_pm_disable;
>         }
>
>         return 0;
> +
> +err_pm_disable:
> +       pm_runtime_disable(&pdev->dev);
> +       return ret;
>  }
>
>  static void fsl_rpmsg_remove(struct platform_device *pdev)
>  {
>         struct fsl_rpmsg *rpmsg = platform_get_drvdata(pdev);
>
> +       pm_runtime_disable(&pdev->dev);
> +
>         if (rpmsg->card_pdev)
>                 platform_device_unregister(rpmsg->card_pdev);
>  }
> --
> 2.42.0
>

  reply	other threads:[~2023-12-27 10:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-25  8:06 [PATCH] ASoC: fsl_rpmsg: Fix error handler with pm_runtime_enable Chancel Liu
2023-12-27 10:13 ` Shengjiu Wang [this message]
2023-12-29 16:58 ` Mark Brown

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=CAA+D8APY3KL6+7kpeqGLm-n_gLTLHOWvMoEZxhrRH2X+9O1d-w@mail.gmail.com \
    --to=shengjiu.wang@gmail.com \
    --cc=Xiubo.Lee@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=chancel.liu@nxp.com \
    --cc=festevam@gmail.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nicoleotsuka@gmail.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).