[ALSA] Replace with kzalloc() - pci stuff
AD1889 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver Intel8x0-modem driver,Maestro3 driver,SonicVibes driver,VIA82xx driver VIA82xx-modem driver,AC97 Codec,AK4531 codec,au88x0 driver CA0106 driver,CS46xx driver,EMU10K1/EMU10K2 driver,HDA Codec driver HDA generic driver,HDA Intel driver,ICE1712 driver,ICE1724 driver KORG1212 driver,MIXART driver,NM256 driver,Trident driver,YMFPCI driver Replace kcalloc(1,..) with kzalloc(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:

committed by
Jaroslav Kysela

parent
9e76a76efc
commit
e560d8d836
@@ -1036,7 +1036,7 @@ static int __devinit _snd_emu10k1_audigy_init_efx(emu10k1_t *emu)
|
||||
spin_lock_init(&emu->fx8010.irq_lock);
|
||||
INIT_LIST_HEAD(&emu->fx8010.gpr_ctl);
|
||||
|
||||
if ((icode = kcalloc(1, sizeof(*icode), GFP_KERNEL)) == NULL ||
|
||||
if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL ||
|
||||
(icode->gpr_map = (u_int32_t __user *)kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
|
||||
(controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(*controls), GFP_KERNEL)) == NULL) {
|
||||
err = -ENOMEM;
|
||||
@@ -1503,11 +1503,11 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
|
||||
spin_lock_init(&emu->fx8010.irq_lock);
|
||||
INIT_LIST_HEAD(&emu->fx8010.gpr_ctl);
|
||||
|
||||
if ((icode = kcalloc(1, sizeof(*icode), GFP_KERNEL)) == NULL)
|
||||
if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL)
|
||||
return -ENOMEM;
|
||||
if ((icode->gpr_map = (u_int32_t __user *)kcalloc(256 + 160 + 160 + 2 * 512, sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
|
||||
(controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(emu10k1_fx8010_control_gpr_t), GFP_KERNEL)) == NULL ||
|
||||
(ipcm = kcalloc(1, sizeof(*ipcm), GFP_KERNEL)) == NULL) {
|
||||
(ipcm = kzalloc(sizeof(*ipcm), GFP_KERNEL)) == NULL) {
|
||||
err = -ENOMEM;
|
||||
goto __err;
|
||||
}
|
||||
@@ -2217,7 +2217,7 @@ static int snd_emu10k1_fx8010_ioctl(snd_hwdep_t * hw, struct file *file, unsigne
|
||||
kfree(ipcm);
|
||||
return res;
|
||||
case SNDRV_EMU10K1_IOCTL_PCM_PEEK:
|
||||
ipcm = kcalloc(1, sizeof(*ipcm), GFP_KERNEL);
|
||||
ipcm = kzalloc(sizeof(*ipcm), GFP_KERNEL);
|
||||
if (ipcm == NULL)
|
||||
return -ENOMEM;
|
||||
if (copy_from_user(ipcm, argp, sizeof(*ipcm))) {
|
||||
|
Reference in New Issue
Block a user