Skip to content

Commit

Permalink
mvneta: 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: Thomas Petazzoni <thomas.petazzoni@free-electrons.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 09ec0d0 commit 6c7a9a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/marvell/mvneta.c
Original file line number Diff line number Diff line change
Expand Up @@ -2811,7 +2811,7 @@ static int mvneta_probe(struct platform_device *pdev)
}

dt_mac_addr = of_get_mac_address(dn);
if (dt_mac_addr && is_valid_ether_addr(dt_mac_addr)) {
if (dt_mac_addr) {
mac_from = "device tree";
memcpy(dev->dev_addr, dt_mac_addr, ETH_ALEN);
} else {
Expand Down

0 comments on commit 6c7a9a3

Please sign in to comment.