14 Jan
2020
14 Jan
'20
7:55 p.m.
- name = kzalloc(32, GFP_KERNEL);
- if (!name)
return -ENOMEM;
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
snprintf(name, 32, "%s-Playback", dai->name);
- else
snprintf(name, 32, "%s-Capture", dai->name);
How about use DAI_SIZE instead of 32 here and above few places? Lets not code number like this please
Yes, thanks for spotting this. kasprintf seems like a better solution I guess, will send a v2.