diff mbox series

[2/4,next] net: lan78xx: Drop unnecessary strcpy in lan78xx_probe

Message ID 1535994759-8938-3-git-send-email-stefan.wahren@i2se.com (mailing list archive)
State New, archived
Headers show
Series net: lan78xx: Minor improvements | expand

Commit Message

Stefan Wahren Sept. 3, 2018, 5:12 p.m. UTC
There is no need for this strcpy because alloc_etherdev() already
does this job.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/net/usb/lan78xx.c | 1 -
 1 file changed, 1 deletion(-)

Comments

RaghuramChary.Jallipalli@microchip.com Sept. 4, 2018, 4:22 a.m. UTC | #1
> There is no need for this strcpy because alloc_etherdev() already does this
> job.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

Reviewed-by: Raghuram Chary Jallipalli <raghuramchary.jallipalli@microchip.com>

Thanks,
-Raghu
diff mbox series

Patch

diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 3f70b94..3d505c2 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -3766,7 +3766,6 @@  static int lan78xx_probe(struct usb_interface *intf,
 	ret = lan78xx_bind(dev, intf);
 	if (ret < 0)
 		goto out2;
-	strcpy(netdev->name, "eth%d");
 
 	if (netdev->mtu > (dev->hard_mtu - netdev->hard_header_len))
 		netdev->mtu = dev->hard_mtu - netdev->hard_header_len;