diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-11 22:36:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-11 22:36:32 -0500 |
commit | 593195f9b2309693f27b402f34573f7920b82c3e (patch) | |
tree | 54d55557665e72e90ef35a1e0f008d381c17ed98 /drivers/media/video/videocodec.c | |
parent | 983d5dbdb2b38d024935f560a91cddcf704875f3 (diff) | |
parent | f9cfc08d640e1586e76eee63cc2b0a9360bc7c7e (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
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) | |||
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) { |