Skip to content

Commit

Permalink
octeon_mgmt: drop redundant mac address check
Browse files Browse the repository at this point in the history
Checking if MAC address is valid using is_valid_ether_addr() is already done in
of_get_mac_address().

Signed-off-by: Luka Perkov <luka@openwrt.org>
Acked-by: David Daney <david.daney@cavium.com>
CC: David Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Luka Perkov authored and David S. Miller committed Oct 30, 2013
1 parent c968601 commit 09ec0d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/octeon/octeon_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 09ec0d0

Please sign in to comment.