23 Dec
2011
23 Dec
'11
12:24 p.m.
On Fri, Dec 23, 2011 at 10:37:51AM +0900, Sangbeom Kim wrote:
- soc_pcm_ops = kzalloc(sizeof(*soc_pcm_ops), GFP_KERNEL);
- if (soc_pcm_ops == NULL) {
snd_printk(KERN_ERR "Cannot allocate PCM OPS\n");
return -ENOMEM;
- }
This patch is good and fixes a real problem but can you please change it slightly so that instead of dynamically allocating the soc_pcm_ops we just embed it directly in the runtime structure. Since every runtime needs an ops structure we may as well just have it embedded directly and not write the allocation, freeing and error handling code.