Merge branch 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm
[cascardo/linux.git] / drivers / net / ethernet / octeon / octeon_mgmt.c
index 622aa75..7dc3e9b 100644 (file)
@@ -1545,15 +1545,16 @@ static int octeon_mgmt_probe(struct platform_device *pdev)
 
        mac = of_get_mac_address(pdev->dev.of_node);
 
-       if (mac && is_valid_ether_addr(mac))
+       if (mac)
                memcpy(netdev->dev_addr, mac, ETH_ALEN);
        else
                eth_hw_addr_random(netdev);
 
        p->phy_np = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
 
-       pdev->dev.coherent_dma_mask = DMA_BIT_MASK(64);
-       pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
+       result = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
+       if (result)
+               goto err;
 
        netif_carrier_off(netdev);
        result = register_netdev(netdev);