Merge tag 'wberr-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton...
[sfrench/cifs-2.6.git] / drivers / net / ethernet / samsung / sxgbe / sxgbe_platform.c
index 73427e29df2afb808a0b525ebb1978df4d76a996..fbd00cb0cb7d7204e97b9b11d8ae058c95148834 100644 (file)
@@ -47,6 +47,8 @@ static int sxgbe_probe_config_dt(struct platform_device *pdev,
        plat->mdio_bus_data = devm_kzalloc(&pdev->dev,
                                           sizeof(*plat->mdio_bus_data),
                                           GFP_KERNEL);
+       if (!plat->mdio_bus_data)
+               return -ENOMEM;
 
        dma_cfg = devm_kzalloc(&pdev->dev, sizeof(*dma_cfg), GFP_KERNEL);
        if (!dma_cfg)