2013-07-16 12:05:12

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH] ASoC: imx-sgtl5000: fix error return code in imx_sgtl5000_probe()

From: Wei Yongjun <[email protected]>

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 <[email protected]>
---
sound/soc/fsl/imx-sgtl5000.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
index 7a8bc12..25f310d 100644
--- a/sound/soc/fsl/imx-sgtl5000.c
+++ b/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);


2013-07-16 12:29:03

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH] ASoC: imx-sgtl5000: fix error return code in imx_sgtl5000_probe()

On Tue, Jul 16, 2013 at 08:05:07PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <[email protected]>
>
> 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 <[email protected]>

Acked-by: Shawn Guo <[email protected]>

2013-07-16 13:52:18

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] ASoC: imx-sgtl5000: fix error return code in imx_sgtl5000_probe()

On Tue, Jul 16, 2013 at 08:05:07PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <[email protected]>
>
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.

Applied, thanks.


Attachments:
(No filename) (253.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments