提交 88446017 编写于 作者: T Tobias Klauser 提交者: David S. Miller

net: tile: Remove unnecessary memset of netdev private data

The memory for private data is allocated using kzalloc/vzalloc in
alloc_netdev_mqs, thus there is no need to zero it again in the driver.
Signed-off-by: NTobias Klauser <tklauser@distanz.ch>
Acked-by: NChris Metcalf <cmetcalf@tilera.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d581ebf5
...@@ -2211,7 +2211,6 @@ static void tile_net_dev_init(const char *name, const uint8_t *mac) ...@@ -2211,7 +2211,6 @@ static void tile_net_dev_init(const char *name, const uint8_t *mac)
/* Initialize "priv". */ /* Initialize "priv". */
priv = netdev_priv(dev); priv = netdev_priv(dev);
memset(priv, 0, sizeof(*priv));
priv->dev = dev; priv->dev = dev;
priv->channel = -1; priv->channel = -1;
priv->loopify_channel = -1; priv->loopify_channel = -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册