]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/iseries_veth.c
Pull sony into release branch
[linux-2.6-omap-h63xx.git] / drivers / net / iseries_veth.c
index 347d50cd77d4ffa243ba1a822b590baf4d503a07..0433c41f9029b8c06cce63e7e0842756f06d8147 100644 (file)
@@ -822,10 +822,9 @@ static int veth_init_connection(u8 rlp)
             || ! HvLpConfig_doLpsCommunicateOnVirtualLan(this_lp, rlp) )
                return 0;
 
-       cnx = kmalloc(sizeof(*cnx), GFP_KERNEL);
+       cnx = kzalloc(sizeof(*cnx), GFP_KERNEL);
        if (! cnx)
                return -ENOMEM;
-       memset(cnx, 0, sizeof(*cnx));
 
        cnx->remote_lp = rlp;
        spin_lock_init(&cnx->lock);
@@ -852,14 +851,13 @@ static int veth_init_connection(u8 rlp)
        if (rc != 0)
                return rc;
 
-       msgs = kmalloc(VETH_NUMBUFFERS * sizeof(struct veth_msg), GFP_KERNEL);
+       msgs = kcalloc(VETH_NUMBUFFERS, sizeof(struct veth_msg), GFP_KERNEL);
        if (! msgs) {
                veth_error("Can't allocate buffers for LPAR %d.\n", rlp);
                return -ENOMEM;
        }
 
        cnx->msgs = msgs;
-       memset(msgs, 0, VETH_NUMBUFFERS * sizeof(struct veth_msg));
 
        for (i = 0; i < VETH_NUMBUFFERS; i++) {
                msgs[i].token = i;