Merge tag 'xtensa-20210429' of git://github.com/jcmvbkbc/linux-xtensa
[linux-2.6-microblaze.git] / drivers / net / ethernet / microchip / lan743x_main.c
index 7b6794a..dae1032 100644 (file)
@@ -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)
@@ -3004,7 +3001,7 @@ static int lan743x_pm_suspend(struct device *dev)
                lan743x_pm_set_wol(adapter);
 
        /* Host sets PME_En, put D3hot */
-       return pci_prepare_to_sleep(pdev);;
+       return pci_prepare_to_sleep(pdev);
 }
 
 static int lan743x_pm_resume(struct device *dev)