Skip to content

Commit 834caaf

Browse files
ying-xuedavem330
authored andcommitted
tipc: remove unnecessary INIT_LIST_HEAD
When a list_head variable is seen as a new entry to be added to a list head, it's unnecessary to be initialized with INIT_LIST_HEAD(). Signed-off-by: Ying Xue <[email protected]> Reviewed-by: Erik Hugne <[email protected]> Reviewed-by: Jon Maloy <[email protected]> Tested-by: Erik Hugne <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5492390 commit 834caaf

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

net/tipc/name_table.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@ static struct publication *publ_create(u32 type, u32 lower, u32 upper,
131131
publ->node = node;
132132
publ->ref = port_ref;
133133
publ->key = key;
134-
INIT_LIST_HEAD(&publ->local_list);
135134
INIT_LIST_HEAD(&publ->pport_list);
136-
INIT_LIST_HEAD(&publ->nodesub_list);
137135
return publ;
138136
}
139137

net/tipc/subscr.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ static int subscr_subscribe(struct tipc_subscr *s,
305305
kfree(sub);
306306
return -EINVAL;
307307
}
308-
INIT_LIST_HEAD(&sub->nameseq_list);
309308
list_add(&sub->subscription_list, &subscriber->subscription_list);
310309
sub->subscriber = subscriber;
311310
sub->swap = swap;

0 commit comments

Comments
 (0)