Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7db3fc29 authored by Antonio Quartulli's avatar Antonio Quartulli Committed by Antonio Quartulli
Browse files

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: default avatarAntonio Quartulli <antonio@open-mesh.com>
Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
parent 38dc40ef
Loading
Loading
Loading
Loading
+1 −7
Original line number Original line Diff line number Diff line
@@ -577,7 +577,7 @@ batadv_hardif_add_interface(struct net_device *net_dev)


	dev_hold(net_dev);
	dev_hold(net_dev);


	hard_iface = kmalloc(sizeof(*hard_iface), GFP_ATOMIC);
	hard_iface = kzalloc(sizeof(*hard_iface), GFP_ATOMIC);
	if (!hard_iface)
	if (!hard_iface)
		goto release_dev;
		goto release_dev;


@@ -603,12 +603,6 @@ batadv_hardif_add_interface(struct net_device *net_dev)
	batadv_check_known_mac_addr(hard_iface->net_dev);
	batadv_check_known_mac_addr(hard_iface->net_dev);
	list_add_tail_rcu(&hard_iface->list, &batadv_hardif_list);
	list_add_tail_rcu(&hard_iface->list, &batadv_hardif_list);


	/* This can't be called via a bat_priv callback because
	 * we have no bat_priv yet.
	 */
	atomic_set(&hard_iface->bat_iv.ogm_seqno, 1);
	hard_iface->bat_iv.ogm_buff = NULL;

	return hard_iface;
	return hard_iface;


free_if:
free_if: