summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/microchip/lan743x_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/microchip/lan743x_main.c')
-rw-r--r--drivers/net/ethernet/microchip/lan743x_main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index 11a1dc4c436d..dae10328c6cf 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -2771,7 +2771,6 @@ static int lan743x_pcidev_probe(struct pci_dev *pdev,
{
struct lan743x_adapter *adapter = NULL;
struct net_device *netdev = NULL;
- const void *mac_addr;
int ret = -ENODEV;
netdev = devm_alloc_etherdev(&pdev->dev,
@@ -2788,9 +2787,7 @@ static int lan743x_pcidev_probe(struct pci_dev *pdev,
NETIF_MSG_IFDOWN | NETIF_MSG_TX_QUEUED;
netdev->max_mtu = LAN743X_MAX_FRAME_SIZE;
- mac_addr = of_get_mac_address(pdev->dev.of_node);
- if (!IS_ERR(mac_addr))
- ether_addr_copy(adapter->mac_address, mac_addr);
+ of_get_mac_address(pdev->dev.of_node, adapter->mac_address);
ret = lan743x_pci_init(adapter, pdev);
if (ret)