]> err.no Git - linux-2.6/blobdiff - drivers/net/wan/cycx_main.c
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
[linux-2.6] / drivers / net / wan / cycx_main.c
index 6e5f1c89851713f12ce45aaab040f36ca406d93d..a0e8611ad8e81e167ac5cf566f82ab7dcf1eeb84 100644 (file)
@@ -113,12 +113,10 @@ static int __init cycx_init(void)
        /* Verify number of cards and allocate adapter data space */
        cycx_ncards = min_t(int, cycx_ncards, CYCX_MAX_CARDS);
        cycx_ncards = max_t(int, cycx_ncards, 1);
-       cycx_card_array = kmalloc(sizeof(struct cycx_device) * cycx_ncards,
-                                 GFP_KERNEL);
+       cycx_card_array = kcalloc(cycx_ncards, sizeof(struct cycx_device), GFP_KERNEL);
        if (!cycx_card_array)
                goto out;
 
-       memset(cycx_card_array, 0, sizeof(struct cycx_device) * cycx_ncards);
 
        /* Register adapters with WAN router */
        for (cnt = 0; cnt < cycx_ncards; ++cnt) {