From: Amir Vadai Date: Sun, 11 Oct 2009 10:16:27 +0000 (+0200) Subject: sdp: removed unneeded list initialization - percpu_counter might not have this memeber X-Git-Tag: v4.1.12-92~264^2~5^2~246 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9d35d26413302a693b5937198841f73afa816f95;p=users%2Fjedix%2Flinux-maple.git sdp: removed unneeded list initialization - percpu_counter might not have this memeber Signed-off-by: Amir Vadai --- diff --git a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c index 5ed6e751e05fc..24d413ff72347 100644 --- a/drivers/infiniband/ulp/sdp/sdp_main.c +++ b/drivers/infiniband/ulp/sdp/sdp_main.c @@ -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);