[alsa-devel] [PATCH 07/21] ASoC: Convert WM8741 to devm_kzalloc()

Thierry Reding thierry.reding at avionic-design.de
Mon Dec 5 07:59:31 CET 2011


* Mark Brown wrote:
> Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
> ---
>  sound/soc/codecs/wm8741.c |   16 ++++------------
>  1 files changed, 4 insertions(+), 12 deletions(-)
> 
> diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c
> index bf471dc..24d8ec5 100644
> --- a/sound/soc/codecs/wm8741.c
> +++ b/sound/soc/codecs/wm8741.c
[...]
> @@ -512,20 +513,13 @@ static int wm8741_i2c_probe(struct i2c_client *i2c,
>  
>  	ret = snd_soc_register_codec(&i2c->dev,
>  				     &soc_codec_dev_wm8741, &wm8741_dai, 1);
> -	if (ret != 0)
> -		goto err;
>  
>  	return ret;
> -
> -err:
> -	kfree(wm8741);
> -	return ret;
>  }

Any particular reason why this is not collapsed into:

	return snd_soc_register_codec(...)

The same goes for patches 8 and 9.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20111205/af0f9712/attachment.sig 


More information about the Alsa-devel mailing list