[dev-5.7 v1 1/4] net: npcm-emc: modify check mac_address function
Tomer Maimon
tmaimon77 at gmail.com
Sun Sep 13 19:51:23 AEST 2020
Signed-off-by: Tomer Maimon <tmaimon77 at gmail.com>
---
drivers/net/ethernet/nuvoton/npcm7xx_emc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/nuvoton/npcm7xx_emc.c b/drivers/net/ethernet/nuvoton/npcm7xx_emc.c
index 9872da33fa5d..f07449e2f68d 100644
--- a/drivers/net/ethernet/nuvoton/npcm7xx_emc.c
+++ b/drivers/net/ethernet/nuvoton/npcm7xx_emc.c
@@ -1752,7 +1752,7 @@ static void get_mac_address(struct net_device *dev)
mac_address = of_get_mac_address(np);
- if (mac_address != 0)
+ if (!IS_ERR(mac_address))
ether_addr_copy(dev->dev_addr, mac_address);
if (is_valid_ether_addr(dev->dev_addr)) {
--
2.22.0
More information about the openbmc
mailing list