diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sound/soc/rockchip/rockchip_spdif.c index 18460851c53e..7977887d6f5f 100644 --- a/sound/soc/rockchip/rockchip_spdif.c +++ b/sound/soc/rockchip/rockchip_spdif.c @@ -399,6 +399,12 @@ static int rk_spdif_probe(struct platform_device *pdev) goto err_pm_runtime; } + ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); + if (ret) { + dev_err(&pdev->dev, "Could not register PCM\n"); + goto err_pm_suspend; + } + ret = devm_snd_soc_register_component(&pdev->dev, &rk_spdif_component, &rk_spdif_dai, 1); @@ -407,12 +413,6 @@ static int rk_spdif_probe(struct platform_device *pdev) goto err_pm_suspend; } - ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); - if (ret) { - dev_err(&pdev->dev, "Could not register PCM\n"); - goto err_pm_suspend; - } - return 0; err_pm_suspend: