提交 4d507dff 编写于 作者: M Markus Pargmann 提交者: David S. Miller

net: cpsw: Add missing return value

ret is set 0 at this point, so jumping to that error label would result
in a return value of 0. Set ret to -ENOMEM to return a proper error
value.
Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
Reviewed-by: NWolfram Sang <wsa@the-dreams.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e4a9839b
...@@ -2123,6 +2123,7 @@ static int cpsw_probe(struct platform_device *pdev) ...@@ -2123,6 +2123,7 @@ static int cpsw_probe(struct platform_device *pdev)
priv->irq_enabled = true; priv->irq_enabled = true;
if (!priv->cpts) { if (!priv->cpts) {
dev_err(&pdev->dev, "error allocating cpts\n"); dev_err(&pdev->dev, "error allocating cpts\n");
ret = -ENOMEM;
goto clean_ndev_ret; goto clean_ndev_ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册