summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/microchip
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-03-19 20:49:23 +0200
committerDavid S. Miller <davem@davemloft.net>2019-03-19 14:59:31 -0700
commitb4f7a6f964fbef348e0e656e4b7d8488b217450f (patch)
tree46678de2cb18f66b85550f8b95e523beb8985cf3 /drivers/net/ethernet/microchip
parent41e48c3d8070eba700f570c600c33c95486c17c3 (diff)
downloadlinux-b4f7a6f964fbef348e0e656e4b7d8488b217450f.tar.bz2
enc28j60: Use ether_addr_copy() in enc28j60_set_mac_address()
Use ether_addr_copy() instead of memcpy() to copy the mac address. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/microchip')
-rw-r--r--drivers/net/ethernet/microchip/enc28j60.c2
1 files changed, 1 insertions, 1 deletions
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);
}