[alsa-devel] [PATCH -next] ASoC: tegra20-ac97: fix error return code in tegra20_ac97_platform_probe()
Wei Yongjun
weiyj.lk at gmail.com
Sat Dec 14 06:15:45 CET 2013
From: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
Fix to return -ENODEV instead of 0 when no GPIO supplied in
tegra20_ac97_platform_probe().
Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
---
sound/soc/tegra/tegra20_ac97.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c
index d8b98d7..3ea9738 100644
--- a/sound/soc/tegra/tegra20_ac97.c
+++ b/sound/soc/tegra/tegra20_ac97.c
@@ -358,6 +358,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
}
} else {
dev_err(&pdev->dev, "no codec-reset GPIO supplied\n");
+ ret = -ENODEV;
goto err_clk_put;
}
@@ -365,6 +366,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
"nvidia,codec-sync-gpio", 0);
if (!gpio_is_valid(ac97->sync_gpio)) {
dev_err(&pdev->dev, "no codec-sync GPIO supplied\n");
+ ret = -ENODEV;
goto err_clk_put;
}
More information about the Alsa-devel
mailing list