diff options
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/ti/netcp_core.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index e37680654a13..b18eeb05b993 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2232,7 +2232,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data, no_phy_slave: mac_addr = of_get_mac_address(slave_node); - if (mac_addr) { + if (!IS_ERR(mac_addr)) { memcpy(slave_data->mac_addr, mac_addr, ETH_ALEN); } else { ret = ti_cm_get_macid(&pdev->dev, i, diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti/netcp_core.c index 01d4ca331f8c..642843945031 100644 --- a/drivers/net/ethernet/ti/netcp_core.c +++ b/drivers/net/ethernet/ti/netcp_core.c @@ -2037,7 +2037,7 @@ static int netcp_create_interface(struct netcp_device *netcp_device, devm_release_mem_region(dev, res.start, size); } else { mac_addr = of_get_mac_address(node_interface); - if (mac_addr) + if (!IS_ERR(mac_addr)) ether_addr_copy(ndev->dev_addr, mac_addr); else eth_random_addr(ndev->dev_addr); |