aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/core/control.c12
-rw-r--r--sound/core/control_compat.c8
-rw-r--r--sound/core/device.c2
-rw-r--r--sound/core/hwdep.c2
-rw-r--r--sound/core/info.c8
-rw-r--r--sound/core/init.c4
-rw-r--r--sound/core/oss/mixer_oss.c26
-rw-r--r--sound/core/oss/pcm_oss.c2
-rw-r--r--sound/core/oss/pcm_plugin.c2
-rw-r--r--sound/core/pcm.c6
-rw-r--r--sound/core/pcm_memory.c2
-rw-r--r--sound/core/pcm_native.c2
-rw-r--r--sound/core/rawmidi.c6
-rw-r--r--sound/core/timer.c10
14 files changed, 46 insertions, 46 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index 227f3cf02771..736edf358e05 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -69,7 +69,7 @@ static int snd_ctl_open(struct inode *inode, struct file *file)
69 err = -EFAULT; 69 err = -EFAULT;
70 goto __error2; 70 goto __error2;
71 } 71 }
72 ctl = kcalloc(1, sizeof(*ctl), GFP_KERNEL); 72 ctl = kzalloc(sizeof(*ctl), GFP_KERNEL);
73 if (ctl == NULL) { 73 if (ctl == NULL) {
74 err = -ENOMEM; 74 err = -ENOMEM;
75 goto __error; 75 goto __error;
@@ -162,7 +162,7 @@ void snd_ctl_notify(snd_card_t *card, unsigned int mask, snd_ctl_elem_id_t *id)
162 goto _found; 162 goto _found;
163 } 163 }
164 } 164 }
165 ev = kcalloc(1, sizeof(*ev), GFP_ATOMIC); 165 ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
166 if (ev) { 166 if (ev) {
167 ev->id = *id; 167 ev->id = *id;
168 ev->mask = mask; 168 ev->mask = mask;
@@ -195,7 +195,7 @@ snd_kcontrol_t *snd_ctl_new(snd_kcontrol_t * control, unsigned int access)
195 195
196 snd_runtime_check(control != NULL, return NULL); 196 snd_runtime_check(control != NULL, return NULL);
197 snd_runtime_check(control->count > 0, return NULL); 197 snd_runtime_check(control->count > 0, return NULL);
198 kctl = kcalloc(1, sizeof(*kctl) + sizeof(snd_kcontrol_volatile_t) * control->count, GFP_KERNEL); 198 kctl = kzalloc(sizeof(*kctl) + sizeof(snd_kcontrol_volatile_t) * control->count, GFP_KERNEL);
199 if (kctl == NULL) 199 if (kctl == NULL)
200 return NULL; 200 return NULL;
201 *kctl = *control; 201 *kctl = *control;
@@ -521,7 +521,7 @@ static int snd_ctl_card_info(snd_card_t * card, snd_ctl_file_t * ctl,
521{ 521{
522 snd_ctl_card_info_t *info; 522 snd_ctl_card_info_t *info;
523 523
524 info = kcalloc(1, sizeof(*info), GFP_KERNEL); 524 info = kzalloc(sizeof(*info), GFP_KERNEL);
525 if (! info) 525 if (! info)
526 return -ENOMEM; 526 return -ENOMEM;
527 down_read(&snd_ioctl_rwsem); 527 down_read(&snd_ioctl_rwsem);
@@ -929,7 +929,7 @@ static int snd_ctl_elem_add(snd_ctl_file_t *file, snd_ctl_elem_info_t *info, int
929 return -EINVAL; 929 return -EINVAL;
930 } 930 }
931 private_size *= info->count; 931 private_size *= info->count;
932 ue = kcalloc(1, sizeof(struct user_element) + private_size, GFP_KERNEL); 932 ue = kzalloc(sizeof(struct user_element) + private_size, GFP_KERNEL);
933 if (ue == NULL) 933 if (ue == NULL)
934 return -ENOMEM; 934 return -ENOMEM;
935 ue->info = *info; 935 ue->info = *info;
@@ -1185,7 +1185,7 @@ static int _snd_ctl_register_ioctl(snd_kctl_ioctl_func_t fcn, struct list_head *
1185{ 1185{
1186 snd_kctl_ioctl_t *pn; 1186 snd_kctl_ioctl_t *pn;
1187 1187
1188 pn = kcalloc(1, sizeof(snd_kctl_ioctl_t), GFP_KERNEL); 1188 pn = kzalloc(sizeof(snd_kctl_ioctl_t), GFP_KERNEL);
1189 if (pn == NULL) 1189 if (pn == NULL)
1190 return -ENOMEM; 1190 return -ENOMEM;
1191 pn->fioctl = fcn; 1191 pn->fioctl = fcn;
diff --git a/sound/core/control_compat.c b/sound/core/control_compat.c
index 7fdabea4bfc8..207c7de5129c 100644
--- a/sound/core/control_compat.c
+++ b/sound/core/control_compat.c
@@ -92,7 +92,7 @@ static int snd_ctl_elem_info_compat(snd_ctl_file_t *ctl, struct sndrv_ctl_elem_i
92 struct sndrv_ctl_elem_info *data; 92 struct sndrv_ctl_elem_info *data;
93 int err; 93 int err;
94 94
95 data = kcalloc(1, sizeof(*data), GFP_KERNEL); 95 data = kzalloc(sizeof(*data), GFP_KERNEL);
96 if (! data) 96 if (! data)
97 return -ENOMEM; 97 return -ENOMEM;
98 98
@@ -271,7 +271,7 @@ static int snd_ctl_elem_read_user_compat(snd_card_t *card,
271 struct sndrv_ctl_elem_value *data; 271 struct sndrv_ctl_elem_value *data;
272 int err, type, count; 272 int err, type, count;
273 273
274 data = kcalloc(1, sizeof(*data), GFP_KERNEL); 274 data = kzalloc(sizeof(*data), GFP_KERNEL);
275 if (data == NULL) 275 if (data == NULL)
276 return -ENOMEM; 276 return -ENOMEM;
277 277
@@ -291,7 +291,7 @@ static int snd_ctl_elem_write_user_compat(snd_ctl_file_t *file,
291 struct sndrv_ctl_elem_value *data; 291 struct sndrv_ctl_elem_value *data;
292 int err, type, count; 292 int err, type, count;
293 293
294 data = kcalloc(1, sizeof(*data), GFP_KERNEL); 294 data = kzalloc(sizeof(*data), GFP_KERNEL);
295 if (data == NULL) 295 if (data == NULL)
296 return -ENOMEM; 296 return -ENOMEM;
297 297
@@ -313,7 +313,7 @@ static int snd_ctl_elem_add_compat(snd_ctl_file_t *file,
313 struct sndrv_ctl_elem_info *data; 313 struct sndrv_ctl_elem_info *data;
314 int err; 314 int err;
315 315
316 data = kcalloc(1, sizeof(*data), GFP_KERNEL); 316 data = kzalloc(sizeof(*data), GFP_KERNEL);
317 if (! data) 317 if (! data)
318 return -ENOMEM; 318 return -ENOMEM;
319 319
diff --git a/sound/core/device.c b/sound/core/device.c
index ca00ad7740c9..1f509f56e60c 100644
--- a/sound/core/device.c
+++ b/sound/core/device.c
@@ -49,7 +49,7 @@ int snd_device_new(snd_card_t *card, snd_device_type_t type,
49 snd_assert(card != NULL, return -ENXIO); 49 snd_assert(card != NULL, return -ENXIO);
50 snd_assert(device_data != NULL, return -ENXIO); 50 snd_assert(device_data != NULL, return -ENXIO);
51 snd_assert(ops != NULL, return -ENXIO); 51 snd_assert(ops != NULL, return -ENXIO);
52 dev = kcalloc(1, sizeof(*dev), GFP_KERNEL); 52 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
53 if (dev == NULL) 53 if (dev == NULL)
54 return -ENOMEM; 54 return -ENOMEM;
55 dev->card = card; 55 dev->card = card;
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c
index 997dd41c584e..9383f1294fb5 100644
--- a/sound/core/hwdep.c
+++ b/sound/core/hwdep.c
@@ -359,7 +359,7 @@ int snd_hwdep_new(snd_card_t * card, char *id, int device, snd_hwdep_t ** rhwdep
359 snd_assert(rhwdep != NULL, return -EINVAL); 359 snd_assert(rhwdep != NULL, return -EINVAL);
360 *rhwdep = NULL; 360 *rhwdep = NULL;
361 snd_assert(card != NULL, return -ENXIO); 361 snd_assert(card != NULL, return -ENXIO);
362 hwdep = kcalloc(1, sizeof(*hwdep), GFP_KERNEL); 362 hwdep = kzalloc(sizeof(*hwdep), GFP_KERNEL);
363 if (hwdep == NULL) 363 if (hwdep == NULL)
364 return -ENOMEM; 364 return -ENOMEM;
365 hwdep->card = card; 365 hwdep->card = card;
diff --git a/sound/core/info.c b/sound/core/info.c
index 7f8bdf7b0058..37024d68a26e 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -295,7 +295,7 @@ static int snd_info_entry_open(struct inode *inode, struct file *file)
295 goto __error; 295 goto __error;
296 } 296 }
297 } 297 }
298 data = kcalloc(1, sizeof(*data), GFP_KERNEL); 298 data = kzalloc(sizeof(*data), GFP_KERNEL);
299 if (data == NULL) { 299 if (data == NULL) {
300 err = -ENOMEM; 300 err = -ENOMEM;
301 goto __error; 301 goto __error;
@@ -304,7 +304,7 @@ static int snd_info_entry_open(struct inode *inode, struct file *file)
304 switch (entry->content) { 304 switch (entry->content) {
305 case SNDRV_INFO_CONTENT_TEXT: 305 case SNDRV_INFO_CONTENT_TEXT:
306 if (mode == O_RDONLY || mode == O_RDWR) { 306 if (mode == O_RDONLY || mode == O_RDWR) {
307 buffer = kcalloc(1, sizeof(*buffer), GFP_KERNEL); 307 buffer = kzalloc(sizeof(*buffer), GFP_KERNEL);
308 if (buffer == NULL) { 308 if (buffer == NULL) {
309 kfree(data); 309 kfree(data);
310 err = -ENOMEM; 310 err = -ENOMEM;
@@ -323,7 +323,7 @@ static int snd_info_entry_open(struct inode *inode, struct file *file)
323 data->rbuffer = buffer; 323 data->rbuffer = buffer;
324 } 324 }
325 if (mode == O_WRONLY || mode == O_RDWR) { 325 if (mode == O_WRONLY || mode == O_RDWR) {
326 buffer = kcalloc(1, sizeof(*buffer), GFP_KERNEL); 326 buffer = kzalloc(sizeof(*buffer), GFP_KERNEL);
327 if (buffer == NULL) { 327 if (buffer == NULL) {
328 if (mode == O_RDWR) { 328 if (mode == O_RDWR) {
329 vfree(data->rbuffer->buffer); 329 vfree(data->rbuffer->buffer);
@@ -752,7 +752,7 @@ char *snd_info_get_str(char *dest, char *src, int len)
752static snd_info_entry_t *snd_info_create_entry(const char *name) 752static snd_info_entry_t *snd_info_create_entry(const char *name)
753{ 753{
754 snd_info_entry_t *entry; 754 snd_info_entry_t *entry;
755 entry = kcalloc(1, sizeof(*entry), GFP_KERNEL); 755 entry = kzalloc(sizeof(*entry), GFP_KERNEL);
756 if (entry == NULL) 756 if (entry == NULL)
757 return NULL; 757 return NULL;
758 entry->name = kstrdup(name, GFP_KERNEL); 758 entry->name = kstrdup(name, GFP_KERNEL);
diff --git a/sound/core/init.c b/sound/core/init.c
index c9c9929121d5..a5702014a704 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -72,7 +72,7 @@ snd_card_t *snd_card_new(int idx, const char *xid,
72 72
73 if (extra_size < 0) 73 if (extra_size < 0)
74 extra_size = 0; 74 extra_size = 0;
75 card = kcalloc(1, sizeof(*card) + extra_size, GFP_KERNEL); 75 card = kzalloc(sizeof(*card) + extra_size, GFP_KERNEL);
76 if (card == NULL) 76 if (card == NULL)
77 return NULL; 77 return NULL;
78 if (xid) { 78 if (xid) {
@@ -702,7 +702,7 @@ static int snd_generic_device_register(snd_card_t *card)
702 if (card->generic_dev) 702 if (card->generic_dev)
703 return 0; /* already registered */ 703 return 0; /* already registered */
704 704
705 dev = kcalloc(1, sizeof(*dev), GFP_KERNEL); 705 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
706 if (! dev) { 706 if (! dev) {
707 snd_printk(KERN_ERR "can't allocate generic_device\n"); 707 snd_printk(KERN_ERR "can't allocate generic_device\n");
708 return -ENOMEM; 708 return -ENOMEM;
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index 98fc0766f885..69e1059112d1 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -53,7 +53,7 @@ static int snd_mixer_oss_open(struct inode *inode, struct file *file)
53 err = snd_card_file_add(card, file); 53 err = snd_card_file_add(card, file);
54 if (err < 0) 54 if (err < 0)
55 return err; 55 return err;
56 fmixer = kcalloc(1, sizeof(*fmixer), GFP_KERNEL); 56 fmixer = kzalloc(sizeof(*fmixer), GFP_KERNEL);
57 if (fmixer == NULL) { 57 if (fmixer == NULL) {
58 snd_card_file_remove(card, file); 58 snd_card_file_remove(card, file);
59 return -ENOMEM; 59 return -ENOMEM;
@@ -517,8 +517,8 @@ static void snd_mixer_oss_get_volume1_vol(snd_mixer_oss_file_t *fmixer,
517 up_read(&card->controls_rwsem); 517 up_read(&card->controls_rwsem);
518 return; 518 return;
519 } 519 }
520 uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); 520 uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL);
521 uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); 521 uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
522 if (uinfo == NULL || uctl == NULL) 522 if (uinfo == NULL || uctl == NULL)
523 goto __unalloc; 523 goto __unalloc;
524 snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc); 524 snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc);
@@ -551,8 +551,8 @@ static void snd_mixer_oss_get_volume1_sw(snd_mixer_oss_file_t *fmixer,
551 up_read(&card->controls_rwsem); 551 up_read(&card->controls_rwsem);
552 return; 552 return;
553 } 553 }
554 uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); 554 uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL);
555 uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); 555 uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
556 if (uinfo == NULL || uctl == NULL) 556 if (uinfo == NULL || uctl == NULL)
557 goto __unalloc; 557 goto __unalloc;
558 snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc); 558 snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc);
@@ -612,8 +612,8 @@ static void snd_mixer_oss_put_volume1_vol(snd_mixer_oss_file_t *fmixer,
612 down_read(&card->controls_rwsem); 612 down_read(&card->controls_rwsem);
613 if ((kctl = snd_ctl_find_numid(card, numid)) == NULL) 613 if ((kctl = snd_ctl_find_numid(card, numid)) == NULL)
614 return; 614 return;
615 uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); 615 uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL);
616 uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); 616 uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
617 if (uinfo == NULL || uctl == NULL) 617 if (uinfo == NULL || uctl == NULL)
618 goto __unalloc; 618 goto __unalloc;
619 snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc); 619 snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc);
@@ -649,8 +649,8 @@ static void snd_mixer_oss_put_volume1_sw(snd_mixer_oss_file_t *fmixer,
649 up_read(&fmixer->card->controls_rwsem); 649 up_read(&fmixer->card->controls_rwsem);
650 return; 650 return;
651 } 651 }
652 uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); 652 uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL);
653 uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); 653 uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
654 if (uinfo == NULL || uctl == NULL) 654 if (uinfo == NULL || uctl == NULL)
655 goto __unalloc; 655 goto __unalloc;
656 snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc); 656 snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc);
@@ -768,8 +768,8 @@ static int snd_mixer_oss_get_recsrc2(snd_mixer_oss_file_t *fmixer, unsigned int
768 snd_ctl_elem_value_t *uctl; 768 snd_ctl_elem_value_t *uctl;
769 int err, idx; 769 int err, idx;
770 770
771 uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); 771 uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL);
772 uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); 772 uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
773 if (uinfo == NULL || uctl == NULL) { 773 if (uinfo == NULL || uctl == NULL) {
774 err = -ENOMEM; 774 err = -ENOMEM;
775 goto __unlock; 775 goto __unlock;
@@ -813,8 +813,8 @@ static int snd_mixer_oss_put_recsrc2(snd_mixer_oss_file_t *fmixer, unsigned int
813 int err; 813 int err;
814 unsigned int idx; 814 unsigned int idx;
815 815
816 uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); 816 uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL);
817 uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); 817 uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
818 if (uinfo == NULL || uctl == NULL) { 818 if (uinfo == NULL || uctl == NULL) {
819 err = -ENOMEM; 819 err = -ENOMEM;
820 goto __unlock; 820 goto __unlock;
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index a038fd8a53f3..842c28b2ed55 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -1740,7 +1740,7 @@ static int snd_pcm_oss_open_file(struct file *file,
1740 snd_assert(rpcm_oss_file != NULL, return -EINVAL); 1740 snd_assert(rpcm_oss_file != NULL, return -EINVAL);
1741 *rpcm_oss_file = NULL; 1741 *rpcm_oss_file = NULL;
1742 1742
1743 pcm_oss_file = kcalloc(1, sizeof(*pcm_oss_file), GFP_KERNEL); 1743 pcm_oss_file = kzalloc(sizeof(*pcm_oss_file), GFP_KERNEL);
1744 if (pcm_oss_file == NULL) 1744 if (pcm_oss_file == NULL)
1745 return -ENOMEM; 1745 return -ENOMEM;
1746 1746
diff --git a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c
index 6430410c6c04..fc23373c000d 100644
--- a/sound/core/oss/pcm_plugin.c
+++ b/sound/core/oss/pcm_plugin.c
@@ -171,7 +171,7 @@ int snd_pcm_plugin_build(snd_pcm_plug_t *plug,
171 171
172 snd_assert(plug != NULL, return -ENXIO); 172 snd_assert(plug != NULL, return -ENXIO);
173 snd_assert(src_format != NULL && dst_format != NULL, return -ENXIO); 173 snd_assert(src_format != NULL && dst_format != NULL, return -ENXIO);
174 plugin = kcalloc(1, sizeof(*plugin) + extra, GFP_KERNEL); 174 plugin = kzalloc(sizeof(*plugin) + extra, GFP_KERNEL);
175 if (plugin == NULL) 175 if (plugin == NULL)
176 return -ENOMEM; 176 return -ENOMEM;
177 plugin->name = name; 177 plugin->name = name;
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 9f4c9209b271..1be470e942ef 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -597,7 +597,7 @@ int snd_pcm_new_stream(snd_pcm_t *pcm, int stream, int substream_count)
597 } 597 }
598 prev = NULL; 598 prev = NULL;
599 for (idx = 0, prev = NULL; idx < substream_count; idx++) { 599 for (idx = 0, prev = NULL; idx < substream_count; idx++) {
600 substream = kcalloc(1, sizeof(*substream), GFP_KERNEL); 600 substream = kzalloc(sizeof(*substream), GFP_KERNEL);
601 if (substream == NULL) 601 if (substream == NULL)
602 return -ENOMEM; 602 return -ENOMEM;
603 substream->pcm = pcm; 603 substream->pcm = pcm;
@@ -657,7 +657,7 @@ int snd_pcm_new(snd_card_t * card, char *id, int device,
657 snd_assert(rpcm != NULL, return -EINVAL); 657 snd_assert(rpcm != NULL, return -EINVAL);
658 *rpcm = NULL; 658 *rpcm = NULL;
659 snd_assert(card != NULL, return -ENXIO); 659 snd_assert(card != NULL, return -ENXIO);
660 pcm = kcalloc(1, sizeof(*pcm), GFP_KERNEL); 660 pcm = kzalloc(sizeof(*pcm), GFP_KERNEL);
661 if (pcm == NULL) 661 if (pcm == NULL)
662 return -ENOMEM; 662 return -ENOMEM;
663 pcm->card = card; 663 pcm->card = card;
@@ -795,7 +795,7 @@ int snd_pcm_open_substream(snd_pcm_t *pcm, int stream,
795 if (substream == NULL) 795 if (substream == NULL)
796 return -EAGAIN; 796 return -EAGAIN;
797 797
798 runtime = kcalloc(1, sizeof(*runtime), GFP_KERNEL); 798 runtime = kzalloc(sizeof(*runtime), GFP_KERNEL);
799 if (runtime == NULL) 799 if (runtime == NULL)
800 return -ENOMEM; 800 return -ENOMEM;
801 801
diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c
index 5df76738470a..b3f5344f60be 100644
--- a/sound/core/pcm_memory.c
+++ b/sound/core/pcm_memory.c
@@ -321,7 +321,7 @@ int snd_pcm_lib_malloc_pages(snd_pcm_substream_t *substream, size_t size)
321 if (substream->dma_buffer.area != NULL && substream->dma_buffer.bytes >= size) { 321 if (substream->dma_buffer.area != NULL && substream->dma_buffer.bytes >= size) {
322 dmab = &substream->dma_buffer; /* use the pre-allocated buffer */ 322 dmab = &substream->dma_buffer; /* use the pre-allocated buffer */
323 } else { 323 } else {
324 dmab = kcalloc(1, sizeof(*dmab), GFP_KERNEL); 324 dmab = kzalloc(sizeof(*dmab), GFP_KERNEL);
325 if (! dmab) 325 if (! dmab)
326 return -ENOMEM; 326 return -ENOMEM;
327 dmab->dev = substream->dma_buffer.dev; 327 dmab->dev = substream->dma_buffer.dev;
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index b829a2727559..67abebabf83e 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -2001,7 +2001,7 @@ static int snd_pcm_open_file(struct file *file,
2001 snd_assert(rpcm_file != NULL, return -EINVAL); 2001 snd_assert(rpcm_file != NULL, return -EINVAL);
2002 *rpcm_file = NULL; 2002 *rpcm_file = NULL;
2003 2003
2004 pcm_file = kcalloc(1, sizeof(*pcm_file), GFP_KERNEL); 2004 pcm_file = kzalloc(sizeof(*pcm_file), GFP_KERNEL);
2005 if (pcm_file == NULL) { 2005 if (pcm_file == NULL) {
2006 return -ENOMEM; 2006 return -ENOMEM;
2007 } 2007 }
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index 4f4b4101b2f5..7c20eafecb8a 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -101,7 +101,7 @@ static int snd_rawmidi_runtime_create(snd_rawmidi_substream_t * substream)
101{ 101{
102 snd_rawmidi_runtime_t *runtime; 102 snd_rawmidi_runtime_t *runtime;
103 103
104 if ((runtime = kcalloc(1, sizeof(*runtime), GFP_KERNEL)) == NULL) 104 if ((runtime = kzalloc(sizeof(*runtime), GFP_KERNEL)) == NULL)
105 return -ENOMEM; 105 return -ENOMEM;
106 spin_lock_init(&runtime->lock); 106 spin_lock_init(&runtime->lock);
107 init_waitqueue_head(&runtime->sleep); 107 init_waitqueue_head(&runtime->sleep);
@@ -1374,7 +1374,7 @@ static int snd_rawmidi_alloc_substreams(snd_rawmidi_t *rmidi,
1374 1374
1375 INIT_LIST_HEAD(&stream->substreams); 1375 INIT_LIST_HEAD(&stream->substreams);
1376 for (idx = 0; idx < count; idx++) { 1376 for (idx = 0; idx < count; idx++) {
1377 substream = kcalloc(1, sizeof(*substream), GFP_KERNEL); 1377 substream = kzalloc(sizeof(*substream), GFP_KERNEL);
1378 if (substream == NULL) 1378 if (substream == NULL)
1379 return -ENOMEM; 1379 return -ENOMEM;
1380 substream->stream = direction; 1380 substream->stream = direction;
@@ -1417,7 +1417,7 @@ int snd_rawmidi_new(snd_card_t * card, char *id, int device,
1417 snd_assert(rrawmidi != NULL, return -EINVAL); 1417 snd_assert(rrawmidi != NULL, return -EINVAL);
1418 *rrawmidi = NULL; 1418 *rrawmidi = NULL;
1419 snd_assert(card != NULL, return -ENXIO); 1419 snd_assert(card != NULL, return -ENXIO);
1420 rmidi = kcalloc(1, sizeof(*rmidi), GFP_KERNEL); 1420 rmidi = kzalloc(sizeof(*rmidi), GFP_KERNEL);
1421 if (rmidi == NULL) 1421 if (rmidi == NULL)
1422 return -ENOMEM; 1422 return -ENOMEM;
1423 rmidi->card = card; 1423 rmidi->card = card;
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 4104f6e292e9..22b104624084 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -98,7 +98,7 @@ static void snd_timer_reschedule(snd_timer_t * timer, unsigned long ticks_left);
98static snd_timer_instance_t *snd_timer_instance_new(char *owner, snd_timer_t *timer) 98static snd_timer_instance_t *snd_timer_instance_new(char *owner, snd_timer_t *timer)
99{ 99{
100 snd_timer_instance_t *timeri; 100 snd_timer_instance_t *timeri;
101 timeri = kcalloc(1, sizeof(*timeri), GFP_KERNEL); 101 timeri = kzalloc(sizeof(*timeri), GFP_KERNEL);
102 if (timeri == NULL) 102 if (timeri == NULL)
103 return NULL; 103 return NULL;
104 timeri->owner = kstrdup(owner, GFP_KERNEL); 104 timeri->owner = kstrdup(owner, GFP_KERNEL);
@@ -764,7 +764,7 @@ int snd_timer_new(snd_card_t *card, char *id, snd_timer_id_t *tid, snd_timer_t *
764 snd_assert(tid != NULL, return -EINVAL); 764 snd_assert(tid != NULL, return -EINVAL);
765 snd_assert(rtimer != NULL, return -EINVAL); 765 snd_assert(rtimer != NULL, return -EINVAL);
766 *rtimer = NULL; 766 *rtimer = NULL;
767 timer = kcalloc(1, sizeof(*timer), GFP_KERNEL); 767 timer = kzalloc(sizeof(*timer), GFP_KERNEL);
768 if (timer == NULL) 768 if (timer == NULL)
769 return -ENOMEM; 769 return -ENOMEM;
770 timer->tmr_class = tid->dev_class; 770 timer->tmr_class = tid->dev_class;
@@ -1017,7 +1017,7 @@ static int snd_timer_register_system(void)
1017 return err; 1017 return err;
1018 strcpy(timer->name, "system timer"); 1018 strcpy(timer->name, "system timer");
1019 timer->hw = snd_timer_system; 1019 timer->hw = snd_timer_system;
1020 priv = kcalloc(1, sizeof(*priv), GFP_KERNEL); 1020 priv = kzalloc(sizeof(*priv), GFP_KERNEL);
1021 if (priv == NULL) { 1021 if (priv == NULL) {
1022 snd_timer_free(timer); 1022 snd_timer_free(timer);
1023 return -ENOMEM; 1023 return -ENOMEM;
@@ -1202,7 +1202,7 @@ static int snd_timer_user_open(struct inode *inode, struct file *file)
1202{ 1202{
1203 snd_timer_user_t *tu; 1203 snd_timer_user_t *tu;
1204 1204
1205 tu = kcalloc(1, sizeof(*tu), GFP_KERNEL); 1205 tu = kzalloc(sizeof(*tu), GFP_KERNEL);
1206 if (tu == NULL) 1206 if (tu == NULL)
1207 return -ENOMEM; 1207 return -ENOMEM;
1208 spin_lock_init(&tu->qlock); 1208 spin_lock_init(&tu->qlock);
@@ -1513,7 +1513,7 @@ static int snd_timer_user_info(struct file *file, snd_timer_info_t __user *_info
1513 t = tu->timeri->timer; 1513 t = tu->timeri->timer;
1514 snd_assert(t != NULL, return -ENXIO); 1514 snd_assert(t != NULL, return -ENXIO);
1515 1515
1516 info = kcalloc(1, sizeof(*info), GFP_KERNEL); 1516 info = kzalloc(sizeof(*info), GFP_KERNEL);
1517 if (! info) 1517 if (! info)
1518 return -ENOMEM; 1518 return -ENOMEM;
1519 info->card = t->card ? t->card->number : -1; 1519 info->card = t->card ? t->card->number : -1;