lkml.org 
[lkml]   [2018]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.4 50/56] net: ethernet: ti: cpsw: fix mdio device reference leak
    Date
    4.4-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Johan Hovold <johan@kernel.org>

    commit 86e1d5adcef961eb383ce4eacbe0ef22f06e2045 upstream.

    Make sure to drop the reference taken by of_find_device_by_node() when
    looking up an mdio device from a phy_id property during probe.

    Fixes: 549985ee9c72 ("cpsw: simplify the setup of the register
    pointers")
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: SZ Lin (林上智) <sz.lin@moxa.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/net/ethernet/ti/cpsw.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/drivers/net/ethernet/ti/cpsw.c
    +++ b/drivers/net/ethernet/ti/cpsw.c
    @@ -2086,6 +2086,7 @@ static int cpsw_probe_dt(struct cpsw_pla
    }
    snprintf(slave_data->phy_id, sizeof(slave_data->phy_id),
    PHY_ID_FMT, mdio->name, phyid);
    + put_device(&mdio->dev);
    } else {
    dev_err(&pdev->dev, "No slave[%d] phy_id or fixed-link property\n", i);
    goto no_phy_slave;

    \
     
     \ /
      Last update: 2018-09-18 00:56    [W:4.125 / U:0.124 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site