提交 7a6b022d 编写于 作者: S Stefan Wahren 提交者: David S. Miller

net: lan78xx: Drop unnecessary strcpy in lan78xx_probe

There is no need for this strcpy because alloc_etherdev() already
does this job.
Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: NRaghuram Chary Jallipalli <raghuramchary.jallipalli@microchip.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 fa8cd98c
...@@ -3766,7 +3766,6 @@ static int lan78xx_probe(struct usb_interface *intf, ...@@ -3766,7 +3766,6 @@ static int lan78xx_probe(struct usb_interface *intf,
ret = lan78xx_bind(dev, intf); ret = lan78xx_bind(dev, intf);
if (ret < 0) if (ret < 0)
goto out2; goto out2;
strcpy(netdev->name, "eth%d");
if (netdev->mtu > (dev->hard_mtu - netdev->hard_header_len)) if (netdev->mtu > (dev->hard_mtu - netdev->hard_header_len))
netdev->mtu = dev->hard_mtu - netdev->hard_header_len; netdev->mtu = dev->hard_mtu - netdev->hard_header_len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册