Staging: Use kcalloc or kzalloc
[linux-2.6-block.git] / drivers / staging / otus / zdusb.c
index bb89d85a4c7ce3e20fbeecdad6c5ffe3f0156b3f..2c799a2502949f0f6423c1dd28a1c19790f92fda 100644 (file)
@@ -95,16 +95,14 @@ static int zfLnxProbe(struct usb_interface *interface,
         printk(KERN_NOTICE "USB 1.1 Host\n");
 #endif
 
-    if (!(macp = kmalloc(sizeof(struct usbdrv_private), GFP_KERNEL)))
+    macp = kzalloc(sizeof(struct usbdrv_private), GFP_KERNEL);
+    if (!macp)
     {
         printk(KERN_ERR "out of memory allocating device structure\n");
         result = -ENOMEM;
         goto fail;
     }
 
-    /* Zero the memory */
-    memset(macp, 0, sizeof(struct usbdrv_private));
-
     net = alloc_etherdev(0);
 
     if (net == NULL)