summaryrefslogtreecommitdiffstats
path: root/sound/oss/emu10k1/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/oss/emu10k1/main.c')
-rw-r--r--sound/oss/emu10k1/main.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sound/oss/emu10k1/main.c b/sound/oss/emu10k1/main.c
index 6c59df7b0001..16ac02540a3f 100644
--- a/sound/oss/emu10k1/main.c
+++ b/sound/oss/emu10k1/main.c
@@ -455,15 +455,13 @@ static int __devinit emu10k1_midi_init(struct emu10k1_card *card)
{
int ret;
- card->mpuout = kmalloc(sizeof(struct emu10k1_mpuout), GFP_KERNEL);
+ card->mpuout = kzalloc(sizeof(struct emu10k1_mpuout), GFP_KERNEL);
if (card->mpuout == NULL) {
printk(KERN_WARNING "emu10k1: Unable to allocate emu10k1_mpuout: out of memory\n");
ret = -ENOMEM;
goto err_out1;
}
- memset(card->mpuout, 0, sizeof(struct emu10k1_mpuout));
-
card->mpuout->intr = 1;
card->mpuout->status = FLAGS_AVAILABLE;
card->mpuout->state = CARDMIDIOUT_STATE_DEFAULT;
@@ -472,15 +470,13 @@ static int __devinit emu10k1_midi_init(struct emu10k1_card *card)
spin_lock_init(&card->mpuout->lock);
- card->mpuin = kmalloc(sizeof(struct emu10k1_mpuin), GFP_KERNEL);
+ card->mpuin = kzalloc(sizeof(struct emu10k1_mpuin), GFP_KERNEL);
if (card->mpuin == NULL) {
printk(KERN_WARNING "emu10k1: Unable to allocate emu10k1_mpuin: out of memory\n");
ret = -ENOMEM;
goto err_out2;
}
- memset(card->mpuin, 0, sizeof(struct emu10k1_mpuin));
-
card->mpuin->status = FLAGS_AVAILABLE;
tasklet_init(&card->mpuin->tasklet, emu10k1_mpuin_bh, (unsigned long) card->mpuin);
@@ -1280,11 +1276,10 @@ static int __devinit emu10k1_probe(struct pci_dev *pci_dev, const struct pci_dev
pci_set_master(pci_dev);
- if ((card = kmalloc(sizeof(struct emu10k1_card), GFP_KERNEL)) == NULL) {
+ if ((card = kzalloc(sizeof(struct emu10k1_card), GFP_KERNEL)) == NULL) {
printk(KERN_ERR "emu10k1: out of memory\n");
return -ENOMEM;
}
- memset(card, 0, sizeof(struct emu10k1_card));
card->iobase = pci_resource_start(pci_dev, 0);
card->length = pci_resource_len(pci_dev, 0);