diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-02-18 13:33:39 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-02-18 13:33:39 +0100 |
commit | 385536090b18534967b1073d0f18b5b86d793c30 (patch) | |
tree | 9b285dce92694b45ac1fba2e37806baadbd4f85a /sound/soc/fsl/fsl_sai.c | |
parent | ALSA: hda: Use scnprintf() for printing texts for sysfs/procfs (diff) | |
parent | ASoC: sun8i-codec: Fix setting DAI data format (diff) | |
download | wireguard-linux-385536090b18534967b1073d0f18b5b86d793c30.tar.xz wireguard-linux-385536090b18534967b1073d0f18b5b86d793c30.zip |
Merge tag 'asoc-fix-v5.6-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.6
A few fixes sent in since the merge window, none of them with global
impact but all important for the users they affect.
Diffstat (limited to 'sound/soc/fsl/fsl_sai.c')
-rw-r--r-- | sound/soc/fsl/fsl_sai.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 8c3ea7300972..9d436b0c5718 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -1020,12 +1020,24 @@ static int fsl_sai_probe(struct platform_device *pdev) ret = devm_snd_soc_register_component(&pdev->dev, &fsl_component, &fsl_sai_dai, 1); if (ret) - return ret; + goto err_pm_disable; - if (sai->soc_data->use_imx_pcm) - return imx_pcm_dma_init(pdev, IMX_SAI_DMABUF_SIZE); - else - return devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); + if (sai->soc_data->use_imx_pcm) { + ret = imx_pcm_dma_init(pdev, IMX_SAI_DMABUF_SIZE); + if (ret) + goto err_pm_disable; + } else { + ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); + if (ret) + goto err_pm_disable; + } + + return ret; + +err_pm_disable: + pm_runtime_disable(&pdev->dev); + + return ret; } static int fsl_sai_remove(struct platform_device *pdev) |