diff options
author | Panagiotis Issaris <takis@issaris.org> | 2006-01-11 16:40:56 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-11 16:40:56 -0500 |
commit | 7408187d223f63d46a13b6a35b8f96b032c2f623 (patch) | |
tree | 425a459f760295de488f57e3f97b034aaa76a78d /drivers/media/dvb/b2c2 | |
parent | 0b3af1b6df82cfdb54ae294ed860263011fa0408 (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/dvb/b2c2')
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop.c b/drivers/media/dvb/b2c2/flexcop.c index 123ed96f6faa..56ba52470676 100644 --- a/drivers/media/dvb/b2c2/flexcop.c +++ b/drivers/media/dvb/b2c2/flexcop.c | |||
@@ -220,20 +220,18 @@ EXPORT_SYMBOL(flexcop_reset_block_300); | |||
220 | struct flexcop_device *flexcop_device_kmalloc(size_t bus_specific_len) | 220 | struct flexcop_device *flexcop_device_kmalloc(size_t bus_specific_len) |
221 | { | 221 | { |
222 | void *bus; | 222 | void *bus; |
223 | struct flexcop_device *fc = kmalloc(sizeof(struct flexcop_device), GFP_KERNEL); | 223 | struct flexcop_device *fc = kzalloc(sizeof(struct flexcop_device), GFP_KERNEL); |
224 | if (!fc) { | 224 | if (!fc) { |
225 | err("no memory"); | 225 | err("no memory"); |
226 | return NULL; | 226 | return NULL; |
227 | } | 227 | } |
228 | memset(fc, 0, sizeof(struct flexcop_device)); | ||
229 | 228 | ||
230 | bus = kmalloc(bus_specific_len, GFP_KERNEL); | 229 | bus = kzalloc(bus_specific_len, GFP_KERNEL); |
231 | if (!bus) { | 230 | if (!bus) { |
232 | err("no memory"); | 231 | err("no memory"); |
233 | kfree(fc); | 232 | kfree(fc); |
234 | return NULL; | 233 | return NULL; |
235 | } | 234 | } |
236 | memset(bus, 0, bus_specific_len); | ||
237 | 235 | ||
238 | fc->bus_specific = bus; | 236 | fc->bus_specific = bus; |
239 | 237 | ||