net: macb: do not copy the mac address if NULL
[platform/kernel/linux-rpi.git] / drivers / net / ethernet / cadence / macb_main.c
index 2375a13..262a28f 100644 (file)
@@ -4180,7 +4180,7 @@ static int macb_probe(struct platform_device *pdev)
        if (PTR_ERR(mac) == -EPROBE_DEFER) {
                err = -EPROBE_DEFER;
                goto err_out_free_netdev;
-       } else if (!IS_ERR(mac)) {
+       } else if (!IS_ERR_OR_NULL(mac)) {
                ether_addr_copy(bp->dev->dev_addr, mac);
        } else {
                macb_get_hwaddr(bp);