convert to zalloc
authorHolger Lubitz <hal@duncan.ol.sub.de>
Sun, 17 Jun 2007 23:25:05 +0000 (01:25 +0200)
committerHolger Lubitz <hal@duncan.ol.sub.de>
Fri, 6 Jul 2007 18:42:05 +0000 (20:42 +0200)
src/drivers/bus/pci.c

index 967441a..1f0ad52 100644 (file)
@@ -245,12 +245,11 @@ static int pcibus_probe ( struct root_device *rootdev ) {
 
                        /* Allocate struct pci_device */
                        if ( ! pci )
-                               pci = malloc ( sizeof ( *pci ) );
+                               pci = zalloc ( sizeof ( *pci ) );
                        if ( ! pci ) {
                                rc = -ENOMEM;
                                goto err;
                        }
-                       memset ( pci, 0, sizeof ( *pci ) );
                        pci->bus = bus;
                        pci->devfn = devfn;