[alsa-devel] [PATCH 1/4] ASoC: imx-sgtl5000: Do not enter the error path on success

Shawn Guo shawn.guo at linaro.org
Thu Apr 18 03:29:40 CEST 2013


On Wed, Apr 17, 2013 at 08:55:18PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam at freescale.com>
> 
> Return on success instead of entering the error path.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
> ---
>  sound/soc/fsl/imx-sgtl5000.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
> index 9584e78..88fc02c 100644
> --- a/sound/soc/fsl/imx-sgtl5000.c
> +++ b/sound/soc/fsl/imx-sgtl5000.c
> @@ -174,6 +174,9 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
>  	}
>  
>  	platform_set_drvdata(pdev, data);
> +
> +	return 0;
> +

This does not look correct.  Doing so will skip clk_put() and
of_node_put() on success.

Shawn

>  clk_fail:
>  	clk_put(data->codec_clk);
>  fail:
> -- 
> 1.7.9.5
> 



More information about the Alsa-devel mailing list