[alsa-devel] [PATCH 2/2] ASoC: imx-audmux: Check for NULL pointer

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Apr 5 14:55:02 CEST 2012


On Thu, Apr 05, 2012 at 02:49:16PM +0200, Marc Kleine-Budde wrote:
> On 04/05/2012 02:45 PM, Fabio Estevam wrote:

> >  	if (audmux_clk)
> >  		clk_prepare_enable(audmux_clk);

> > +	if (!audmux_base)
> > +		return -ENOSYS;

> What about "clk_prepare_enable"? Do you need to undo it in case of an error?

Or alternatively just reverse the order of the two tests so you don't
need to worry about that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20120405/27004daa/attachment.sig 


More information about the Alsa-devel mailing list