Skip to contentSkip to conversation

mvneta: remove double validation of mac address

PATCH In review Laurent Navet 2 participants 2 messages Oct 29, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mvneta: remove double validation of mac address

Mac address validity is already checked in of_get_mac_address(). No need to do it twice.

---
 drivers/net/ethernet/marvell/mvneta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/mvneta.c +1 -1
index e35bac7..7d99e695 100644
@@ -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 {
Signature · 1 line
1.8.4.rc3
#1 lore raw

Dear Laurent Navet,

Quoted 4 lines · Laurent Navet

Mac address validity is already checked in of_get_mac_address(). No need to do it twice.

Thanks, but an identical patch has been posted by Luka Perkov <[email protected]> just a few days ago. See
http://www.spinics.net/lists/netdev/msg255454.html.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com