提交 e87f66b3 编写于 作者: N Niels Dossche 提交者: Jakub Kicinski

net: mdio: Fix ENOMEM return value in BCM6368 mux bus controller

Error values inside the probe function must be < 0. The ENOMEM return
value has the wrong sign: it is positive instead of negative.
Add a minus sign.

Fixes: e2397567 ("net: mdio: Add BCM6368 MDIO mux bus controller")
Signed-off-by: NNiels Dossche <dossche.niels@gmail.com>
Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20220428211931.8130-1-dossche.niels@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 ff5265d4
...@@ -115,7 +115,7 @@ static int bcm6368_mdiomux_probe(struct platform_device *pdev) ...@@ -115,7 +115,7 @@ static int bcm6368_mdiomux_probe(struct platform_device *pdev)
md->mii_bus = devm_mdiobus_alloc(&pdev->dev); md->mii_bus = devm_mdiobus_alloc(&pdev->dev);
if (!md->mii_bus) { if (!md->mii_bus) {
dev_err(&pdev->dev, "mdiomux bus alloc failed\n"); dev_err(&pdev->dev, "mdiomux bus alloc failed\n");
return ENOMEM; return -ENOMEM;
} }
bus = md->mii_bus; bus = md->mii_bus;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册