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

Commit 13b0ea0f authored by Tobias Klauser's avatar Tobias Klauser Committed by Simon Wunderlich
Browse files

batman-adv: Omit unnecessary memset of netdev private data



The memory for netdev_priv is allocated using kzalloc in alloc_netdev
(or alloc_netdev_mq respectively) so there is no need to set it to 0
again.

Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
parent 4e09991a
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -972,8 +972,6 @@ static void batadv_softif_free(struct net_device *dev)
 */
static void batadv_softif_init_early(struct net_device *dev)
{
	struct batadv_priv *priv = netdev_priv(dev);

	ether_setup(dev);

	dev->netdev_ops = &batadv_netdev_ops;
@@ -990,8 +988,6 @@ static void batadv_softif_init_early(struct net_device *dev)
	eth_hw_addr_random(dev);

	dev->ethtool_ops = &batadv_ethtool_ops;

	memset(priv, 0, sizeof(*priv));
}

struct net_device *batadv_softif_create(struct net *net, const char *name)