diff mbox

[-next] ASoC: es8328: fix error return code in es8328_codec_probe()

Message ID 1409532470-32364-1-git-send-email-weiyj_lk@163.com (mailing list archive)
State Accepted
Commit 75c3daaad5a2f791e0fbad732690130ce1bc55d2
Headers show

Commit Message

weiyj_lk@163.com Sept. 1, 2014, 12:47 a.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 sound/soc/codecs/es8328.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Mark Brown Sept. 1, 2014, 10:34 a.m. UTC | #1
On Mon, Sep 01, 2014 at 08:47:50AM +0800, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/codecs/es8328.c b/sound/soc/codecs/es8328.c
index 7a9f65a..3ff7870 100644
--- a/sound/soc/codecs/es8328.c
+++ b/sound/soc/codecs/es8328.c
@@ -665,6 +665,7 @@  static int es8328_codec_probe(struct snd_soc_codec *codec)
 	es8328->clk = devm_clk_get(codec->dev, NULL);
 	if (IS_ERR(es8328->clk)) {
 		dev_err(codec->dev, "codec clock missing or invalid\n");
+		ret = PTR_ERR(es8328->clk);
 		goto clk_fail;
 	}