[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:38:40 CEST 2013


On Thu, Apr 18, 2013 at 09:29:40AM +0800, Shawn Guo wrote:
> 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.

Well, clk_put() shouldn't be called on success, but of_node_put()
should.

Shawn



More information about the Alsa-devel mailing list