diff options
author | Panagiotis Issaris <takis@issaris.org> | 2006-01-12 00:40:56 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-12 00:40:56 +0300 |
commit | 7408187d223f63d46a13b6a35b8f96b032c2f623 (patch) | |
tree | 425a459f760295de488f57e3f97b034aaa76a78d /drivers/media/video/videocodec.c | |
parent | 0b3af1b6df82cfdb54ae294ed860263011fa0408 (diff) | |
download | linux-7408187d223f63d46a13b6a35b8f96b032c2f623.tar.xz |
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>
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 839db622040d..8f271de57fd6 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) { |