diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2015-01-14 13:42:29 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-14 14:46:53 -0500 |
commit | 53f7faa17e9489f8b7be67dd9e87167f1779ef28 (patch) | |
tree | 554f8caf412fcdaf9fb19f1774ec7bd3ad41cb7a /sound | |
parent | 9cf247473167df29a3d99464385b4afe1fc16f2f (diff) |
ASoC: samsung: i2s: Add return value checks in probe()
These functions may fail so let's properly report any errors.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/samsung/i2s.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index e5473ee799d7..aa52b41f1749 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c | |||
@@ -1173,11 +1173,13 @@ static int samsung_i2s_probe(struct platform_device *pdev) | |||
1173 | dev_err(&pdev->dev, "Unable to get drvdata\n"); | 1173 | dev_err(&pdev->dev, "Unable to get drvdata\n"); |
1174 | return -EFAULT; | 1174 | return -EFAULT; |
1175 | } | 1175 | } |
1176 | devm_snd_soc_register_component(&sec_dai->pdev->dev, | 1176 | ret = devm_snd_soc_register_component(&sec_dai->pdev->dev, |
1177 | &samsung_i2s_component, | 1177 | &samsung_i2s_component, |
1178 | &sec_dai->i2s_dai_drv, 1); | 1178 | &sec_dai->i2s_dai_drv, 1); |
1179 | samsung_asoc_dma_platform_register(&pdev->dev); | 1179 | if (ret != 0) |
1180 | return 0; | 1180 | return ret; |
1181 | |||
1182 | return samsung_asoc_dma_platform_register(&pdev->dev); | ||
1181 | } | 1183 | } |
1182 | 1184 | ||
1183 | pri_dai = i2s_alloc_dai(pdev, false); | 1185 | pri_dai = i2s_alloc_dai(pdev, false); |
@@ -1290,7 +1292,9 @@ static int samsung_i2s_probe(struct platform_device *pdev) | |||
1290 | 1292 | ||
1291 | pm_runtime_enable(&pdev->dev); | 1293 | pm_runtime_enable(&pdev->dev); |
1292 | 1294 | ||
1293 | samsung_asoc_dma_platform_register(&pdev->dev); | 1295 | ret = samsung_asoc_dma_platform_register(&pdev->dev); |
1296 | if (ret != 0) | ||
1297 | return ret; | ||
1294 | 1298 | ||
1295 | return 0; | 1299 | return 0; |
1296 | err: | 1300 | err: |