Browse Source

ASoC: imx-sgtl5000: fix error return code in imx_sgtl5000_probe()

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>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Wei Yongjun 12 years ago
parent
commit
f1269ae41f
1 changed files with 3 additions and 1 deletions
  1. 3 1
      sound/soc/fsl/imx-sgtl5000.c

+ 3 - 1
sound/soc/fsl/imx-sgtl5000.c

@@ -129,8 +129,10 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
 	}
 
 	data->codec_clk = devm_clk_get(&codec_dev->dev, NULL);
-	if (IS_ERR(data->codec_clk))
+	if (IS_ERR(data->codec_clk)) {
+		ret = PTR_ERR(data->codec_clk);
 		goto fail;
+	}
 
 	data->clk_frequency = clk_get_rate(data->codec_clk);