aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/b2c2/flexcop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/b2c2/flexcop.c')
-rw-r--r--drivers/media/dvb/b2c2/flexcop.c6
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);
220struct flexcop_device *flexcop_device_kmalloc(size_t bus_specific_len) 220struct 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