Repository navigation
ASoC: hdac_hdmi: use devm_kzalloc for all structures - #491
Conversation
bardliao
left a comment
There was a problem hiding this comment.
Something seems to be missed and should we keep list_del()?
There was a problem hiding this comment.
Should we keep all of the list_del()? The list may point to an unexpected address after the stuff is freed.
There was a problem hiding this comment.
I assumed the structure which contains the list would be freed anyway, so not sure if there is any merit in cleaning-up the list?
There was a problem hiding this comment.
Oh yes, the structure itself will be freed. So it is not necessary to delete the list. Thanks.
9c7d965 to
3c71692
Compare
|
updated code based on @bardliao's comments |
3c71692 to
561e4f8
Compare
Loading/unloading modules exposes issues with memory allocation, which is a mix of devm_kzalloc and manual kzalloc. Move to devm_k routines everywhere to simplify all this. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
561e4f8 to
ea1975b
Compare
|
@plbossart this PR looks good. But a general question on device managed resources. Do these resources get freed after the remove() method is finished or before? |
|
@plbossart i just looked up and it looks like all devm resources are freed after the remove() completes. |
Loading/unloading modules exposes issues with memory allocation, which
is a mix of devm_kzalloc and manual kzalloc. Move to devm_kzalloc
everywhere to simplify all this.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com