From 7408187d223f63d46a13b6a35b8f96b032c2f623 Mon Sep 17 00:00:00 2001 From: Panagiotis Issaris Date: Wed, 11 Jan 2006 19:40:56 -0200 Subject: V4L/DVB (3344a): Conversions from kmalloc+memset to k(z|c)alloc Conversions from kmalloc+memset to k(z|c)alloc. Signed-off-by: Panagiotis Issaris Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/videocodec.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'drivers/media/video/videocodec.c') 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) { -- cgit v1.2.3-70-g09d2