aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers/dummy.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/drivers/dummy.c')
-rw-r--r--sound/drivers/dummy.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index a61640cf7ae7..64ef7f62851d 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -337,7 +337,7 @@ static int snd_card_dummy_playback_open(snd_pcm_substream_t * substream)
337 snd_card_dummy_pcm_t *dpcm; 337 snd_card_dummy_pcm_t *dpcm;
338 int err; 338 int err;
339 339
340 dpcm = kcalloc(1, sizeof(*dpcm), GFP_KERNEL); 340 dpcm = kzalloc(sizeof(*dpcm), GFP_KERNEL);
341 if (dpcm == NULL) 341 if (dpcm == NULL)
342 return -ENOMEM; 342 return -ENOMEM;
343 init_timer(&dpcm->timer); 343 init_timer(&dpcm->timer);
@@ -368,7 +368,7 @@ static int snd_card_dummy_capture_open(snd_pcm_substream_t * substream)
368 snd_card_dummy_pcm_t *dpcm; 368 snd_card_dummy_pcm_t *dpcm;
369 int err; 369 int err;
370 370
371 dpcm = kcalloc(1, sizeof(*dpcm), GFP_KERNEL); 371 dpcm = kzalloc(sizeof(*dpcm), GFP_KERNEL);
372 if (dpcm == NULL) 372 if (dpcm == NULL)
373 return -ENOMEM; 373 return -ENOMEM;
374 init_timer(&dpcm->timer); 374 init_timer(&dpcm->timer);
@@ -600,6 +600,10 @@ static int __init snd_card_dummy_probe(int dev)
600 strcpy(card->driver, "Dummy"); 600 strcpy(card->driver, "Dummy");
601 strcpy(card->shortname, "Dummy"); 601 strcpy(card->shortname, "Dummy");
602 sprintf(card->longname, "Dummy %i", dev + 1); 602 sprintf(card->longname, "Dummy %i", dev + 1);
603
604 if ((err = snd_card_set_generic_dev(card)) < 0)
605 goto __nodev;
606
603 if ((err = snd_card_register(card)) == 0) { 607 if ((err = snd_card_register(card)) == 0) {
604 snd_dummy_cards[dev] = card; 608 snd_dummy_cards[dev] = card;
605 return 0; 609 return 0;