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>
This commit is contained in:
Andy Shevchenko 2019-03-19 20:49:23 +02:00 committed by David S. Miller
parent 41e48c3d80
commit b4f7a6f964
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}