aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/emu10k1')
-rw-r--r--sound/pci/emu10k1/emu10k1_main.c2
-rw-r--r--sound/pci/emu10k1/emu10k1x.c6
-rw-r--r--sound/pci/emu10k1/emufx.c8
-rw-r--r--sound/pci/emu10k1/emupcm.c10
-rw-r--r--sound/pci/emu10k1/p16v.c4
5 files changed, 15 insertions, 15 deletions
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index e69d5b739e80..03617ec0742f 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -865,7 +865,7 @@ int __devinit snd_emu10k1_create(snd_card_t * card,
865 if ((err = pci_enable_device(pci)) < 0) 865 if ((err = pci_enable_device(pci)) < 0)
866 return err; 866 return err;
867 867
868 emu = kcalloc(1, sizeof(*emu), GFP_KERNEL); 868 emu = kzalloc(sizeof(*emu), GFP_KERNEL);
869 if (emu == NULL) { 869 if (emu == NULL) {
870 pci_disable_device(pci); 870 pci_disable_device(pci);
871 return -ENOMEM; 871 return -ENOMEM;
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c
index 52c7826df440..8c151af521d7 100644
--- a/sound/pci/emu10k1/emu10k1x.c
+++ b/sound/pci/emu10k1/emu10k1x.c
@@ -395,7 +395,7 @@ static int snd_emu10k1x_playback_open(snd_pcm_substream_t *substream)
395 if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0) 395 if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0)
396 return err; 396 return err;
397 397
398 epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); 398 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
399 if (epcm == NULL) 399 if (epcm == NULL)
400 return -ENOMEM; 400 return -ENOMEM;
401 epcm->emu = chip; 401 epcm->emu = chip;
@@ -571,7 +571,7 @@ static int snd_emu10k1x_pcm_open_capture(snd_pcm_substream_t *substream)
571 if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0) 571 if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0)
572 return err; 572 return err;
573 573
574 epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); 574 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
575 if (epcm == NULL) 575 if (epcm == NULL)
576 return -ENOMEM; 576 return -ENOMEM;
577 577
@@ -920,7 +920,7 @@ static int __devinit snd_emu10k1x_create(snd_card_t *card,
920 return -ENXIO; 920 return -ENXIO;
921 } 921 }
922 922
923 chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); 923 chip = kzalloc(sizeof(*chip), GFP_KERNEL);
924 if (chip == NULL) { 924 if (chip == NULL) {
925 pci_disable_device(pci); 925 pci_disable_device(pci);
926 return -ENOMEM; 926 return -ENOMEM;
diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
index 2f7a03103c91..646b5d972e6f 100644
--- a/sound/pci/emu10k1/emufx.c
+++ b/sound/pci/emu10k1/emufx.c
@@ -1036,7 +1036,7 @@ static int __devinit _snd_emu10k1_audigy_init_efx(emu10k1_t *emu)
1036 spin_lock_init(&emu->fx8010.irq_lock); 1036 spin_lock_init(&emu->fx8010.irq_lock);
1037 INIT_LIST_HEAD(&emu->fx8010.gpr_ctl); 1037 INIT_LIST_HEAD(&emu->fx8010.gpr_ctl);
1038 1038
1039 if ((icode = kcalloc(1, sizeof(*icode), GFP_KERNEL)) == NULL || 1039 if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL ||
1040 (icode->gpr_map = (u_int32_t __user *)kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t), GFP_KERNEL)) == NULL || 1040 (icode->gpr_map = (u_int32_t __user *)kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
1041 (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(*controls), GFP_KERNEL)) == NULL) { 1041 (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(*controls), GFP_KERNEL)) == NULL) {
1042 err = -ENOMEM; 1042 err = -ENOMEM;
@@ -1503,11 +1503,11 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
1503 spin_lock_init(&emu->fx8010.irq_lock); 1503 spin_lock_init(&emu->fx8010.irq_lock);
1504 INIT_LIST_HEAD(&emu->fx8010.gpr_ctl); 1504 INIT_LIST_HEAD(&emu->fx8010.gpr_ctl);
1505 1505
1506 if ((icode = kcalloc(1, sizeof(*icode), GFP_KERNEL)) == NULL) 1506 if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL)
1507 return -ENOMEM; 1507 return -ENOMEM;
1508 if ((icode->gpr_map = (u_int32_t __user *)kcalloc(256 + 160 + 160 + 2 * 512, sizeof(u_int32_t), GFP_KERNEL)) == NULL || 1508 if ((icode->gpr_map = (u_int32_t __user *)kcalloc(256 + 160 + 160 + 2 * 512, sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
1509 (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(emu10k1_fx8010_control_gpr_t), GFP_KERNEL)) == NULL || 1509 (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(emu10k1_fx8010_control_gpr_t), GFP_KERNEL)) == NULL ||
1510 (ipcm = kcalloc(1, sizeof(*ipcm), GFP_KERNEL)) == NULL) { 1510 (ipcm = kzalloc(sizeof(*ipcm), GFP_KERNEL)) == NULL) {
1511 err = -ENOMEM; 1511 err = -ENOMEM;
1512 goto __err; 1512 goto __err;
1513 } 1513 }
@@ -2217,7 +2217,7 @@ static int snd_emu10k1_fx8010_ioctl(snd_hwdep_t * hw, struct file *file, unsigne
2217 kfree(ipcm); 2217 kfree(ipcm);
2218 return res; 2218 return res;
2219 case SNDRV_EMU10K1_IOCTL_PCM_PEEK: 2219 case SNDRV_EMU10K1_IOCTL_PCM_PEEK:
2220 ipcm = kcalloc(1, sizeof(*ipcm), GFP_KERNEL); 2220 ipcm = kzalloc(sizeof(*ipcm), GFP_KERNEL);
2221 if (ipcm == NULL) 2221 if (ipcm == NULL)
2222 return -ENOMEM; 2222 return -ENOMEM;
2223 if (copy_from_user(ipcm, argp, sizeof(*ipcm))) { 2223 if (copy_from_user(ipcm, argp, sizeof(*ipcm))) {
diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c
index 9c35f6dde1b5..66ba27afe962 100644
--- a/sound/pci/emu10k1/emupcm.c
+++ b/sound/pci/emu10k1/emupcm.c
@@ -1016,7 +1016,7 @@ static int snd_emu10k1_efx_playback_open(snd_pcm_substream_t * substream)
1016 snd_pcm_runtime_t *runtime = substream->runtime; 1016 snd_pcm_runtime_t *runtime = substream->runtime;
1017 int i; 1017 int i;
1018 1018
1019 epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); 1019 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
1020 if (epcm == NULL) 1020 if (epcm == NULL)
1021 return -ENOMEM; 1021 return -ENOMEM;
1022 epcm->emu = emu; 1022 epcm->emu = emu;
@@ -1049,7 +1049,7 @@ static int snd_emu10k1_playback_open(snd_pcm_substream_t * substream)
1049 snd_pcm_runtime_t *runtime = substream->runtime; 1049 snd_pcm_runtime_t *runtime = substream->runtime;
1050 int i, err; 1050 int i, err;
1051 1051
1052 epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); 1052 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
1053 if (epcm == NULL) 1053 if (epcm == NULL)
1054 return -ENOMEM; 1054 return -ENOMEM;
1055 epcm->emu = emu; 1055 epcm->emu = emu;
@@ -1094,7 +1094,7 @@ static int snd_emu10k1_capture_open(snd_pcm_substream_t * substream)
1094 snd_pcm_runtime_t *runtime = substream->runtime; 1094 snd_pcm_runtime_t *runtime = substream->runtime;
1095 emu10k1_pcm_t *epcm; 1095 emu10k1_pcm_t *epcm;
1096 1096
1097 epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); 1097 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
1098 if (epcm == NULL) 1098 if (epcm == NULL)
1099 return -ENOMEM; 1099 return -ENOMEM;
1100 epcm->emu = emu; 1100 epcm->emu = emu;
@@ -1130,7 +1130,7 @@ static int snd_emu10k1_capture_mic_open(snd_pcm_substream_t * substream)
1130 emu10k1_pcm_t *epcm; 1130 emu10k1_pcm_t *epcm;
1131 snd_pcm_runtime_t *runtime = substream->runtime; 1131 snd_pcm_runtime_t *runtime = substream->runtime;
1132 1132
1133 epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); 1133 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
1134 if (epcm == NULL) 1134 if (epcm == NULL)
1135 return -ENOMEM; 1135 return -ENOMEM;
1136 epcm->emu = emu; 1136 epcm->emu = emu;
@@ -1170,7 +1170,7 @@ static int snd_emu10k1_capture_efx_open(snd_pcm_substream_t * substream)
1170 int nefx = emu->audigy ? 64 : 32; 1170 int nefx = emu->audigy ? 64 : 32;
1171 int idx; 1171 int idx;
1172 1172
1173 epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); 1173 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
1174 if (epcm == NULL) 1174 if (epcm == NULL)
1175 return -ENOMEM; 1175 return -ENOMEM;
1176 epcm->emu = emu; 1176 epcm->emu = emu;
diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c
index a1691330d3b6..d59c7f345ad6 100644
--- a/sound/pci/emu10k1/p16v.c
+++ b/sound/pci/emu10k1/p16v.c
@@ -178,7 +178,7 @@ static int snd_p16v_pcm_open_playback_channel(snd_pcm_substream_t *substream, in
178 snd_pcm_runtime_t *runtime = substream->runtime; 178 snd_pcm_runtime_t *runtime = substream->runtime;
179 int err; 179 int err;
180 180
181 epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); 181 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
182 //snd_printk("epcm kcalloc: %p\n", epcm); 182 //snd_printk("epcm kcalloc: %p\n", epcm);
183 183
184 if (epcm == NULL) 184 if (epcm == NULL)
@@ -214,7 +214,7 @@ static int snd_p16v_pcm_open_capture_channel(snd_pcm_substream_t *substream, int
214 snd_pcm_runtime_t *runtime = substream->runtime; 214 snd_pcm_runtime_t *runtime = substream->runtime;
215 int err; 215 int err;
216 216
217 epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); 217 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
218 //snd_printk("epcm kcalloc: %p\n", epcm); 218 //snd_printk("epcm kcalloc: %p\n", epcm);
219 219
220 if (epcm == NULL) 220 if (epcm == NULL)