lkml.org 
[lkml]   [2018]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 29/67] net: amd: add missing of_node_put()
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

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

    [ Upstream commit c44c749d3b6fdfca39002e7e48e03fe9f9fe37a3 ]

    of_find_node_by_path() acquires a reference to the node
    returned by it and that reference needs to be dropped by its caller.
    This place doesn't do that, so fix it.

    Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/net/ethernet/amd/sunlance.c | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    diff --git a/drivers/net/ethernet/amd/sunlance.c b/drivers/net/ethernet/amd/sunlance.c
    index 291ca5187f12..9845e07d40cd 100644
    --- a/drivers/net/ethernet/amd/sunlance.c
    +++ b/drivers/net/ethernet/amd/sunlance.c
    @@ -1418,7 +1418,7 @@ static int sparc_lance_probe_one(struct platform_device *op,

    prop = of_get_property(nd, "tpe-link-test?", NULL);
    if (!prop)
    - goto no_link_test;
    + goto node_put;

    if (strcmp(prop, "true")) {
    printk(KERN_NOTICE "SunLance: warning: overriding option "
    @@ -1427,6 +1427,8 @@ static int sparc_lance_probe_one(struct platform_device *op,
    "to ecd@skynet.be\n");
    auxio_set_lte(AUXIO_LTE_ON);
    }
    +node_put:
    + of_node_put(nd);
    no_link_test:
    lp->auto_select = 1;
    lp->tpe = 0;
    --
    2.19.1


    \
     
     \ /
      Last update: 2018-12-11 17:11    [W:4.824 / U:0.872 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site