提交 53f7faa1 编写于 作者: S Sylwester Nawrocki 提交者: Mark Brown

ASoC: samsung: i2s: Add return value checks in probe()

These functions may fail so let's properly report any errors.
Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 9cf24747
......@@ -1173,11 +1173,13 @@ static int samsung_i2s_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "Unable to get drvdata\n");
return -EFAULT;
}
devm_snd_soc_register_component(&sec_dai->pdev->dev,
ret = devm_snd_soc_register_component(&sec_dai->pdev->dev,
&samsung_i2s_component,
&sec_dai->i2s_dai_drv, 1);
samsung_asoc_dma_platform_register(&pdev->dev);
return 0;
if (ret != 0)
return ret;
return samsung_asoc_dma_platform_register(&pdev->dev);
}
pri_dai = i2s_alloc_dai(pdev, false);
......@@ -1290,7 +1292,9 @@ static int samsung_i2s_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev);
samsung_asoc_dma_platform_register(&pdev->dev);
ret = samsung_asoc_dma_platform_register(&pdev->dev);
if (ret != 0)
return ret;
return 0;
err:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册