aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videocodec.c
diff options
context:
space:
mode:
authorPanagiotis Issaris <takis@issaris.org>2006-01-11 16:40:56 -0500
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-11 16:40:56 -0500
commit7408187d223f63d46a13b6a35b8f96b032c2f623 (patch)
tree425a459f760295de488f57e3f97b034aaa76a78d /drivers/media/video/videocodec.c
parent0b3af1b6df82cfdb54ae294ed860263011fa0408 (diff)
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.c11
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)
124 if (res == 0) { 124 if (res == 0) {
125 dprintk(3, "videocodec_attach '%s'\n", 125 dprintk(3, "videocodec_attach '%s'\n",
126 codec->name); 126 codec->name);
127 ptr = (struct attached_list *) 127 ptr = kzalloc(sizeof(struct attached_list), GFP_KERNEL);
128 kmalloc(sizeof(struct attached_list),
129 GFP_KERNEL);
130 if (!ptr) { 128 if (!ptr) {
131 dprintk(1, 129 dprintk(1,
132 KERN_ERR 130 KERN_ERR
133 "videocodec_attach: no memory\n"); 131 "videocodec_attach: no memory\n");
134 goto out_kfree; 132 goto out_kfree;
135 } 133 }
136 memset(ptr, 0,
137 sizeof(struct attached_list));
138 ptr->codec = codec; 134 ptr->codec = codec;
139 135
140 a = h->list; 136 a = h->list;
@@ -249,14 +245,11 @@ videocodec_register (const struct videocodec *codec)
249 "videocodec: register '%s', type: %x, flags %lx, magic %lx\n", 245 "videocodec: register '%s', type: %x, flags %lx, magic %lx\n",
250 codec->name, codec->type, codec->flags, codec->magic); 246 codec->name, codec->type, codec->flags, codec->magic);
251 247
252 ptr = 248 ptr = kzalloc(sizeof(struct codec_list), GFP_KERNEL);
253 (struct codec_list *) kmalloc(sizeof(struct codec_list),
254 GFP_KERNEL);
255 if (!ptr) { 249 if (!ptr) {
256 dprintk(1, KERN_ERR "videocodec_register: no memory\n"); 250 dprintk(1, KERN_ERR "videocodec_register: no memory\n");
257 return -ENOMEM; 251 return -ENOMEM;
258 } 252 }
259 memset(ptr, 0, sizeof(struct codec_list));
260 ptr->codec = codec; 253 ptr->codec = codec;
261 254
262 if (!h) { 255 if (!h) {