X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=sound%2Foss%2Ftrident.c;h=3bc1f6e9e4a3b35b8a1f9ac170d743f916ec54d6;hb=ec4883b015c3212f6f6d04fb2ff45f528492f598;hp=6b1f8c9cdcf870419924dad10156dcf395df4e9f;hpb=ec0bf39a471bf6fcd01def2bd677128cea940b73;p=powerpc.git diff --git a/sound/oss/trident.c b/sound/oss/trident.c index 6b1f8c9cdc..3bc1f6e9e4 100644 --- a/sound/oss/trident.c +++ b/sound/oss/trident.c @@ -18,7 +18,7 @@ * Ollie Lho SiS 7018 Audio Core Support * Ching-Ling Lee ALi 5451 Audio Core Support * Matt Wu ALi 5451 Audio Core Support - * Peter Wächtler CyberPro5050 support + * Peter Wächtler CyberPro5050 support * Muli Ben-Yehuda * * @@ -89,7 +89,7 @@ * use set_current_state, properly release resources on failure in * trident_probe, get rid of check_region * v0.14.9c - * August 10 2001 Peter Wächtler + * August 10 2001 Peter Wächtler * added support for Tvia (formerly Integraphics/IGST) CyberPro5050 * this chip is often found in settop boxes (combined video+audio) * v0.14.9b @@ -207,7 +207,6 @@ #include #include #include -#include #include #include #include @@ -2729,12 +2728,11 @@ trident_open(struct inode *inode, struct file *file) } for (i = 0; i < NR_HW_CH; i++) { if (card->states[i] == NULL) { - state = card->states[i] = kmalloc(sizeof(*state), GFP_KERNEL); + state = card->states[i] = kzalloc(sizeof(*state), GFP_KERNEL); if (state == NULL) { mutex_unlock(&card->open_mutex); return -ENOMEM; } - memset(state, 0, sizeof(*state)); mutex_init(&state->sem); dmabuf = &state->dmabuf; goto found_virt; @@ -3618,7 +3616,7 @@ ali_allocate_other_states_resources(struct trident_state *state, int chan_nums) } return -EBUSY; } - s = card->states[i] = kmalloc(sizeof(*state), GFP_KERNEL); + s = card->states[i] = kzalloc(sizeof(*state), GFP_KERNEL); if (!s) { num = ali_multi_channels_5_1[state_count]; ali_free_pcm_channel(card, num); @@ -3630,7 +3628,6 @@ ali_allocate_other_states_resources(struct trident_state *state, int chan_nums) } return -ENOMEM; } - memset(s, 0, sizeof(*state)); s->dmabuf.channel = channel; s->dmabuf.ossfragshift = s->dmabuf.ossmaxfrags = @@ -4399,11 +4396,10 @@ trident_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_id) } rc = -ENOMEM; - if ((card = kmalloc(sizeof(*card), GFP_KERNEL)) == NULL) { + if ((card = kzalloc(sizeof(*card), GFP_KERNEL)) == NULL) { printk(KERN_ERR "trident: out of memory\n"); goto out_release_region; } - memset(card, 0, sizeof (*card)); init_timer(&card->timer); card->iobase = iobase;