diff --git a/sound/soc/rockchip/rockchip_spdifrx.c b/sound/soc/rockchip/rockchip_spdifrx.c index 9856f4a2bc7b..baa9df6dff7a 100644 --- a/sound/soc/rockchip/rockchip_spdifrx.c +++ b/sound/soc/rockchip/rockchip_spdifrx.c @@ -328,6 +328,12 @@ static int rk_spdifrx_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_spdifrx_component, &rk_spdifrx_dai, 1); @@ -336,12 +342,6 @@ static int rk_spdifrx_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: