diff options
Diffstat (limited to 'drivers/media/video/videocodec.c')
-rw-r--r-- | drivers/media/video/videocodec.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/media/video/videocodec.c b/drivers/media/video/videocodec.c index 839db622040..8f271de57fd 100644 --- a/drivers/media/video/videocodec.c +++ b/drivers/media/video/videocodec.c @@ -124,17 +124,13 @@ videocodec_attach (struct videocodec_master *master) if (res == 0) { dprintk(3, "videocodec_attach '%s'\n", codec->name); - ptr = (struct attached_list *) - kmalloc(sizeof(struct attached_list), - GFP_KERNEL); + ptr = kzalloc(sizeof(struct attached_list), GFP_KERNEL); if (!ptr) { dprintk(1, KERN_ERR "videocodec_attach: no memory\n"); goto out_kfree; } - memset(ptr, 0, - sizeof(struct attached_list)); ptr->codec = codec; a = h->list; @@ -249,14 +245,11 @@ videocodec_register (const struct videocodec *codec) "videocodec: register '%s', type: %x, flags %lx, magic %lx\n", codec->name, codec->type, codec->flags, codec->magic); - ptr = - (struct codec_list *) kmalloc(sizeof(struct codec_list), - GFP_KERNEL); + ptr = kzalloc(sizeof(struct codec_list), GFP_KERNEL); if (!ptr) { dprintk(1, KERN_ERR "videocodec_register: no memory\n"); return -ENOMEM; } - memset(ptr, 0, sizeof(struct codec_list)); ptr->codec = codec; if (!h) { |