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

index 12cf774..eae90b3 100644 (file)
@@ -347,12 +347,11 @@ static int t509bus_probe ( struct root_device *rootdev ) {
        for ( tag = 1 ; tag <= t509_max_tag ; tag++ ) {
                /* Allocate struct t509_device */
                if ( ! t509 )
-                       t509 = malloc ( sizeof ( *t509 ) );
+                       t509 = zalloc ( sizeof ( *t509 ) );
                if ( ! t509 ) {
                        rc = -ENOMEM;
                        goto err;
                }
-               memset ( t509, 0, sizeof ( *t509 ) );
                t509->tag = tag;
 
                /* Send the ID sequence */