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 <takis@issaris.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
diff --git a/drivers/media/video/videocodec.c b/drivers/media/video/videocodec.c
index 839db62..8f271de 100644
--- a/drivers/media/video/videocodec.c
+++ b/drivers/media/video/videocodec.c
@@ -124,17 +124,13 @@
 			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 '%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) {