Merge tag 'arm-soc/for-5.18/maintainers' of https://github.com/Broadcom/stblinux...
[linux-2.6-microblaze.git] / drivers / net / ethernet / xilinx / ll_temac_main.c
index b900ab5..64c7e26 100644 (file)
@@ -1433,6 +1433,8 @@ static int temac_probe(struct platform_device *pdev)
                lp->indirect_lock = devm_kmalloc(&pdev->dev,
                                                 sizeof(*lp->indirect_lock),
                                                 GFP_KERNEL);
+               if (!lp->indirect_lock)
+                       return -ENOMEM;
                spin_lock_init(lp->indirect_lock);
        }