From: Luka Perkov Date: Tue, 29 Oct 2013 23:09:12 +0000 (+0100) Subject: octeon_mgmt: drop redundant mac address check X-Git-Tag: v5.15~18996^2~98 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=09ec0d051a66feaeca72a370f0a76da6f266af37;p=platform%2Fkernel%2Flinux-starfive.git octeon_mgmt: drop redundant mac address check Checking if MAC address is valid using is_valid_ether_addr() is already done in of_get_mac_address(). Signed-off-by: Luka Perkov Acked-by: David Daney CC: David Miller Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/octeon/octeon_mgmt.c b/drivers/net/ethernet/octeon/octeon_mgmt.c index 622aa75..1b326cbc 100644 --- a/drivers/net/ethernet/octeon/octeon_mgmt.c +++ b/drivers/net/ethernet/octeon/octeon_mgmt.c @@ -1545,7 +1545,7 @@ 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);