]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - sound/core/seq/seq_virmidi.c
some kmalloc/memset ->kzalloc (tree wide)
[mirror_ubuntu-zesty-kernel.git] / sound / core / seq / seq_virmidi.c
index 061a7c61402a7fefc4f16f00fe0c99a710486962..e11790f6debea51e2b4fe24c4fc1ebab2c10654b 100644 (file)
@@ -363,7 +363,7 @@ static int snd_virmidi_dev_attach_seq(struct snd_virmidi_dev *rdev)
        if (rdev->client >= 0)
                return 0;
 
-       pinfo = kmalloc(sizeof(*pinfo), GFP_KERNEL);
+       pinfo = kzalloc(sizeof(*pinfo), GFP_KERNEL);
        if (!pinfo) {
                err = -ENOMEM;
                goto __error;
@@ -380,7 +380,6 @@ static int snd_virmidi_dev_attach_seq(struct snd_virmidi_dev *rdev)
        rdev->client = client;
 
        /* create a port */
-       memset(pinfo, 0, sizeof(*pinfo));
        pinfo->addr.client = client;
        sprintf(pinfo->name, "VirMIDI %d-%d", rdev->card->number, rdev->device);
        /* set all capabilities */