提交 f6c1fb0a 编写于 作者: D Dan Carpenter 提交者: David S. Miller

net: ethernet: dwmac: Fix an error code in imx_dwmac_probe()

The code is return PTR_ERR(NULL) which is zero or success.  We should
return -ENOMEM instead.

Fixes: 94abdad6 ("net: ethernet: dwmac: add ethernet glue logic for NXP imx8 chip")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NFugang Duan <fugang.duan@nxp.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c7e261d8
......@@ -225,7 +225,7 @@ static int imx_dwmac_probe(struct platform_device *pdev)
dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL);
if (!dwmac)
return PTR_ERR(dwmac);
return -ENOMEM;
plat_dat = stmmac_probe_config_dt(pdev, &stmmac_res.mac);
if (IS_ERR(plat_dat))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册