]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/media/dvb/b2c2/flexcop.c
V4L/DVB (3344a): Conversions from kmalloc+memset to k(z|c)alloc
[karo-tx-linux.git] / drivers / media / dvb / b2c2 / flexcop.c
index 123ed96f6faa54d4851c6e3c3171735dc9a01bd7..56ba52470676821070a88050b43c35d634f3d209 100644 (file)
@@ -220,20 +220,18 @@ EXPORT_SYMBOL(flexcop_reset_block_300);
 struct flexcop_device *flexcop_device_kmalloc(size_t bus_specific_len)
 {
        void *bus;
-       struct flexcop_device *fc = kmalloc(sizeof(struct flexcop_device), GFP_KERNEL);
+       struct flexcop_device *fc = kzalloc(sizeof(struct flexcop_device), GFP_KERNEL);
        if (!fc) {
                err("no memory");
                return NULL;
        }
-       memset(fc, 0, sizeof(struct flexcop_device));
 
-       bus = kmalloc(bus_specific_len, GFP_KERNEL);
+       bus = kzalloc(bus_specific_len, GFP_KERNEL);
        if (!bus) {
                err("no memory");
                kfree(fc);
                return NULL;
        }
-       memset(bus, 0, bus_specific_len);
 
        fc->bus_specific = bus;