]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sdp: removed unneeded list initialization - percpu_counter might not have this memeber
authorAmir Vadai <amirv@mellanox.co.il>
Sun, 11 Oct 2009 10:16:27 +0000 (12:16 +0200)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:04:39 +0000 (05:04 -0700)
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp_main.c

index 5ed6e751e05fc8ddbfae899d19be616af0f2a585..24d413ff72347119136709997ee9825a7a5a9a59 100644 (file)
@@ -2627,17 +2627,14 @@ static int __init sdp_init(void)
        spin_lock_init(&sock_list_lock);
        spin_lock_init(&sdp_large_sockets_lock);
 
-       sockets_allocated = kmalloc(sizeof(*sockets_allocated), GFP_KERNEL);
+       sockets_allocated = kzalloc(sizeof(*sockets_allocated), GFP_KERNEL);
        if (!sockets_allocated)
                goto no_mem_sockets_allocated;
 
-       orphan_count = kmalloc(sizeof(*orphan_count), GFP_KERNEL);
+       orphan_count = kzalloc(sizeof(*orphan_count), GFP_KERNEL);
        if (!orphan_count)
                goto no_mem_orphan_count;
 
-       INIT_LIST_HEAD(&sockets_allocated->list);
-       INIT_LIST_HEAD(&orphan_count->list);
-
        percpu_counter_init(sockets_allocated, 0);
        percpu_counter_init(orphan_count, 0);