lkml.org 
[lkml]   [2020]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.5 067/170] drivers/of/of_mdio.c:fix of_mdiobus_register()
    Date
    From: Dajun Jin <adajunjin@gmail.com>

    [ Upstream commit 209c65b61d94344522c41a83cd6ce51aac5fd0a4 ]

    When registers a phy_device successful, should terminate the loop
    or the phy_device would be registered in other addr. If there are
    multiple PHYs without reg properties, it will go wrong.

    Signed-off-by: Dajun Jin <adajunjin@gmail.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/of/of_mdio.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
    index fc757ef6eadc5..a27234c58ec56 100644
    --- a/drivers/of/of_mdio.c
    +++ b/drivers/of/of_mdio.c
    @@ -269,6 +269,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
    rc = of_mdiobus_register_phy(mdio, child, addr);
    if (rc && rc != -ENODEV)
    goto unregister;
    + break;
    }
    }
    }
    --
    2.20.1


    \
     
     \ /
      Last update: 2020-03-31 11:05    [W:2.794 / U:0.468 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site