summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_rpmsg.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-01-04 08:58:30 +0100
committerTakashi Iwai <tiwai@suse.de>2024-01-04 08:58:30 +0100
commit2cd06bc7d7266a7a353a23ce91b82e0614ff190f (patch)
tree976be61cd07b5df12c40a4107b32b0d53f99bd94 /sound/soc/fsl/fsl_rpmsg.c
parentc344ef36dbc2fe920ec7291b68b11fe867a2c8f6 (diff)
parentb036d8ef3120b996751495ce25994eea58032a98 (diff)
Merge tag 'asoc-fix-v6.7-rc8' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.7 I recently got a LibreTech Sapphire board for my CI and while integrating it found and fixed some issues, including crashes for the enum validation. There's also a couple of patches adding quirks for another x86 laptop from Hans and an error handling fix for the Freescale rpmsg driver.
Diffstat (limited to 'sound/soc/fsl/fsl_rpmsg.c')
-rw-r--r--sound/soc/fsl/fsl_rpmsg.c10
1 files 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);
}