drivers/char/ip2/ip2main.c: kmalloc + memset conversion to kzalloc
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>
Wed, 17 Oct 2007 06:26:45 +0000 (23:26 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:42:50 +0000 (08:42 -0700)
 drivers/char/ip2/ip2main.c | 104398 -> 104346 (-52 bytes)
 drivers/char/ip2/ip2main.o | 210710 -> 210702 (-8 bytes)

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/ip2/ip2main.c

index bd94d5f9e62b62191b10f3525c43819d1ff2882f..3300ba3c85886f6efa5d72f12183cdc30cad1878 100644 (file)
@@ -646,10 +646,9 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize)
 
        for ( i = 0; i < IP2_MAX_BOARDS; ++i ) {
                if ( ip2config.addr[i] ) {
-                       pB = kmalloc( sizeof(i2eBordStr), GFP_KERNEL);
-                       if ( pB != NULL ) {
+                       pB = kzalloc(sizeof(i2eBordStr), GFP_KERNEL);
+                       if (pB) {
                                i2BoardPtrTable[i] = pB;
-                               memset( pB, 0, sizeof(i2eBordStr) );
                                iiSetAddress( pB, ip2config.addr[i], ii2DelayTimer );
                                iiReset( pB );
                        } else {