diff options
author | Antonio Quartulli <antonio@open-mesh.com> | 2013-04-02 06:16:53 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-05-28 20:44:54 -0400 |
commit | 7db3fc291bb22bf43667b009dd0e701ed4eb7c96 (patch) | |
tree | 2448e8c608644fcb9f89b78bc774a8b0bd033709 /net/batman-adv/hard-interface.c | |
parent | 38dc40ef52d882e08b2af71fc1b5413ac7009952 (diff) |
batman-adv: don't initialise batman_iv private members in hard-interface.c
hard-interface.c has to do not contain any routing algorithm
specific code.
Allocate the hard-interface with kzalloc() and remove any
useless and algorithm specific member initialisation
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/hard-interface.c')
-rw-r--r-- | net/batman-adv/hard-interface.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index 4a76ed654c92..c478e6bcf89b 100644 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c | |||
@@ -577,7 +577,7 @@ batadv_hardif_add_interface(struct net_device *net_dev) | |||
577 | 577 | ||
578 | dev_hold(net_dev); | 578 | dev_hold(net_dev); |
579 | 579 | ||
580 | hard_iface = kmalloc(sizeof(*hard_iface), GFP_ATOMIC); | 580 | hard_iface = kzalloc(sizeof(*hard_iface), GFP_ATOMIC); |
581 | if (!hard_iface) | 581 | if (!hard_iface) |
582 | goto release_dev; | 582 | goto release_dev; |
583 | 583 | ||
@@ -603,12 +603,6 @@ batadv_hardif_add_interface(struct net_device *net_dev) | |||
603 | batadv_check_known_mac_addr(hard_iface->net_dev); | 603 | batadv_check_known_mac_addr(hard_iface->net_dev); |
604 | list_add_tail_rcu(&hard_iface->list, &batadv_hardif_list); | 604 | list_add_tail_rcu(&hard_iface->list, &batadv_hardif_list); |
605 | 605 | ||
606 | /* This can't be called via a bat_priv callback because | ||
607 | * we have no bat_priv yet. | ||
608 | */ | ||
609 | atomic_set(&hard_iface->bat_iv.ogm_seqno, 1); | ||
610 | hard_iface->bat_iv.ogm_buff = NULL; | ||
611 | |||
612 | return hard_iface; | 606 | return hard_iface; |
613 | 607 | ||
614 | free_if: | 608 | free_if: |