diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c index 711ed9c2631b..303b4da66399 100644 --- a/drivers/net/ethernet/xilinx/ll_temac_main.c +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c @@ -1579,10 +1579,9 @@ static int temac_probe(struct platform_device *pdev) if (temac_np) { /* Retrieve the MAC address */ rc = of_get_mac_address(temac_np, addr); - if (rc) { - dev_err(&pdev->dev, "could not find MAC address\n"); - return -ENODEV; - } + if (rc) + return dev_err_probe(&pdev->dev, rc, + "could not find MAC address\n"); temac_init_mac_address(ndev, addr); } else if (pdata) { temac_init_mac_address(ndev, pdata->mac_addr);