RE: [alsa-devel] [PATCH] ASoC: core: Use devm_kzalloc() insteadkzalloc()

From: Li.Xiubo@xxxxxxxxxxxxx
Date: Sun Jan 19 2014 - 22:18:54 EST

Hi Mar, Lars

> > I don't like this. I don't think it is a good design pattern to call
> > devm function from within (especial non-devm) library functions. It
> > creates an asymmetric API. The memory is allocated when
> > snd_dmaengine_pcm_register() is called, but it is not freed when
> > snd_dmaengine_pcm_unregister() is called. This goes against the
> > principle of least surprise.
> Yes, I tend to agree - unless we only support managed registration the
> API shouldn't do managed things internally.

Got it.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at