net: bgmac: fix reversed check for MII registration error
authorRafał Miłecki <rafal@milecki.pl>
Wed, 17 Aug 2016 13:37:14 +0000 (15:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Aug 2016 06:23:41 +0000 (23:23 -0700)
It was failing on successful registration returning meaningless errors.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Fixes: 55954f3bfdac ("net: ethernet: bgmac: move BCMA MDIO Phy code into a separate file")
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bgmac-bcma.c

index 9a9745c4047c3757c4b1733dae9d5908db44baa1..625235db644f73bdbbc7a79088e6a15c60d27019 100644 (file)
@@ -159,7 +159,7 @@ static int bgmac_probe(struct bcma_device *core)
 
        if (!bgmac_is_bcm4707_family(core)) {
                mii_bus = bcma_mdio_mii_register(core, bgmac->phyaddr);
-               if (!IS_ERR(mii_bus)) {
+               if (IS_ERR(mii_bus)) {
                        err = PTR_ERR(mii_bus);
                        goto err;
                }