Staging: unisys: Replace kmalloc/memset with kzalloc
[deliverable/linux.git] / drivers / staging / unisys / virtpci / virtpci.c
index 0c15932c2443a8284b189dc8f2f3136dacb27d66..6886293c347350e0381d5970c4663889c36bf894 100644 (file)
@@ -909,15 +909,13 @@ static int virtpci_device_add(struct device *parentbus, int devtype,
        }
 
        /* add a Virtual Device */
-       virtpcidev = kmalloc(sizeof(struct virtpci_dev), GFP_ATOMIC);
+       virtpcidev = kzalloc(sizeof(struct virtpci_dev), GFP_ATOMIC);
        if (virtpcidev == NULL) {
                LOGERR("can't add device - malloc FALLED\n");
                POSTCODE_LINUX_2(MALLOC_FAILURE_PC, POSTCODE_SEVERITY_ERR);
                return 0;
        }
 
-       memset(virtpcidev, 0, sizeof(struct virtpci_dev));
-
        /* initialize stuff unique to virtpci_dev struct */
        virtpcidev->devtype = devtype;
        if (devtype == VIRTHBA_TYPE) {
This page took 0.025429 seconds and 5 git commands to generate.