diff options
author | Chaithrika U S <chaithrika@ti.com> | 2009-06-08 06:49:41 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-06-08 14:55:12 +0100 |
commit | efd13be09e2db4ac4efa2c6101c4f50ee1ead4b0 (patch) | |
tree | 0f5319c276c3b44713a1c6e55a9cd2be952d3091 /sound/soc/davinci | |
parent | 04f80f5c486b39446af44e218dba90ec210d61ca (diff) | |
download | kernel_samsung_crespo-efd13be09e2db4ac4efa2c6101c4f50ee1ead4b0.zip kernel_samsung_crespo-efd13be09e2db4ac4efa2c6101c4f50ee1ead4b0.tar.gz kernel_samsung_crespo-efd13be09e2db4ac4efa2c6101c4f50ee1ead4b0.tar.bz2 |
ASoC: Minor fixes to DaVinci I2S probe function
Assign proper errors when platform resource claims fail.
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/davinci')
-rw-r--r-- | sound/soc/davinci/davinci-i2s.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c index 500d2f5..2f11970 100644 --- a/sound/soc/davinci/davinci-i2s.c +++ b/sound/soc/davinci/davinci-i2s.c @@ -469,7 +469,7 @@ static int davinci_i2s_probe(struct platform_device *pdev) struct snd_platform_data *pdata = pdev->dev.platform_data; struct davinci_mcbsp_dev *dev; struct resource *mem, *ioarea, *res; - int ret = 0; + int ret; mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!mem) { @@ -511,6 +511,7 @@ static int davinci_i2s_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_DMA, 0); if (!res) { dev_err(&pdev->dev, "no DMA resource\n"); + ret = -ENXIO; goto err_free_mem; } dev->dma_params[SNDRV_PCM_STREAM_PLAYBACK]->channel = res->start; @@ -518,6 +519,7 @@ static int davinci_i2s_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_DMA, 1); if (!res) { dev_err(&pdev->dev, "no DMA resource\n"); + ret = -ENXIO; goto err_free_mem; } dev->dma_params[SNDRV_PCM_STREAM_CAPTURE]->channel = res->start; |