aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/core/seq/seq_virmidi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c
index 061a7c61402a..e11790f6debe 100644
--- a/sound/core/seq/seq_virmidi.c
+++ b/sound/core/seq/seq_virmidi.c
@@ -363,7 +363,7 @@ static int snd_virmidi_dev_attach_seq(struct snd_virmidi_dev *rdev)
363 if (rdev->client >= 0) 363 if (rdev->client >= 0)
364 return 0; 364 return 0;
365 365
366 pinfo = kmalloc(sizeof(*pinfo), GFP_KERNEL); 366 pinfo = kzalloc(sizeof(*pinfo), GFP_KERNEL);
367 if (!pinfo) { 367 if (!pinfo) {
368 err = -ENOMEM; 368 err = -ENOMEM;
369 goto __error; 369 goto __error;
@@ -380,7 +380,6 @@ static int snd_virmidi_dev_attach_seq(struct snd_virmidi_dev *rdev)
380 rdev->client = client; 380 rdev->client = client;
381 381
382 /* create a port */ 382 /* create a port */
383 memset(pinfo, 0, sizeof(*pinfo));
384 pinfo->addr.client = client; 383 pinfo->addr.client = client;
385 sprintf(pinfo->name, "VirMIDI %d-%d", rdev->card->number, rdev->device); 384 sprintf(pinfo->name, "VirMIDI %d-%d", rdev->card->number, rdev->device);
386 /* set all capabilities */ 385 /* set all capabilities */