convert to zalloc
authorHolger Lubitz <hal@duncan.ol.sub.de>
Sun, 17 Jun 2007 23:25:00 +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/isapnp.c

index 7903208..a19beb8 100644 (file)
@@ -653,12 +653,11 @@ static int isapnpbus_probe ( struct root_device *rootdev ) {
 
                        /* Allocate struct isapnp_device */
                        if ( ! isapnp )
-                               isapnp = malloc ( sizeof ( *isapnp ) );
+                               isapnp = zalloc ( sizeof ( *isapnp ) );
                        if ( ! isapnp ) {
                                rc = -ENOMEM;
                                goto err;
                        }
-                       memset ( isapnp, 0, sizeof ( *isapnp ) );
                        isapnp->csn = csn;
                        isapnp->logdev = logdev;