Replace the specification of data types by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
snd_printk(KERN_ERR "no memory\n");
return NULL;
}
- p->chset.channels = kcalloc(max_channels, sizeof(struct snd_midi_channel), GFP_KERNEL);
+ p->chset.channels = kcalloc(max_channels, sizeof(*p->chset.channels),
+ GFP_KERNEL);
if (p->chset.channels == NULL) {
snd_printk(KERN_ERR "no memory\n");
kfree(p);
if (emu->midi_ports <= 0)
return 0;
- emu->vmidi = kcalloc(emu->midi_ports, sizeof(struct snd_rawmidi *), GFP_KERNEL);
+ emu->vmidi = kcalloc(emu->midi_ports, sizeof(*emu->vmidi), GFP_KERNEL);
if (emu->vmidi == NULL)
return -ENOMEM;