Subject: [PATCH v2 06/13] enc28j60: Use ether_addr_copy() in enc28j60_set_mac_address()

From: Andy Shevchenko <[email-masked]>
Date: Mon, 18 Mar 2019 18:10:55 +0200

Use ether_addr_copy() instead of memcpy() to copy the mac address.

Signed-off-by: Andy Shevchenko <[email-masked]>
---
 drivers/net/ethernet/microchip/enc28j60.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/microchip/enc28j60.c b/drivers/net/ethernet/microchip/enc28j60.c
index 4cf4525260b7..273e69c84291 100644
--- a/drivers/net/ethernet/microchip/enc28j60.c
+++ b/drivers/net/ethernet/microchip/enc28j60.c
@@ -527,7 +527,7 @@ static int enc28j60_set_mac_address(struct net_device *dev, void *addr)
 	if (!is_valid_ether_addr(address->sa_data))
 		return -EADDRNOTAVAIL;
 
-	memcpy(dev->dev_addr, address->sa_data, dev->addr_len);
+	ether_addr_copy(dev->dev_addr, address->sa_data);
 	return enc28j60_set_hw_macaddr(dev);
 }
 
-- 
2.20.1