]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: mdio: Fix ENOMEM return value in BCM6368 mux bus controller
authorNiels Dossche <dossche.niels@gmail.com>
Thu, 28 Apr 2022 21:19:32 +0000 (23:19 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 30 Apr 2022 00:58:41 +0000 (17:58 -0700)
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: a610c95f8d34 ("net: mdio: Add BCM6368 MDIO mux bus controller")
Signed-off-by: Niels Dossche <dossche.niels@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20220428211931.8130-1-dossche.niels@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/mdio/mdio-mux-bcm6368.c

index 6dcbf987d61b5fc93567b4a2b4d39a3b4f9840ce..8b444a8eb6b55601d0b3e04be8465b54f49abeb2 100644 (file)
@@ -115,7 +115,7 @@ static int bcm6368_mdiomux_probe(struct platform_device *pdev)
        md->mii_bus = devm_mdiobus_alloc(&pdev->dev);
        if (!md->mii_bus) {
                dev_err(&pdev->dev, "mdiomux bus alloc failed\n");
-               return ENOMEM;
+               return -ENOMEM;
        }
 
        bus = md->mii_bus;