lkml.org 
[lkml]   [2021]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.12 104/160] net: ipa: Add missing of_node_put() in ipa_firmware_load()
    Date
    From: Yang Yingliang <yangyingliang@huawei.com>

    [ Upstream commit b244163f2c45c12053cb0291c955f892e79ed8a9 ]

    This node pointer is returned by of_parse_phandle() with refcount
    incremented in this function. of_node_put() on it before exiting
    this function.

    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
    Acked-by: Alex Elder <elder@linaro.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/net/ipa/ipa_main.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c
    index 97c1b55405cb..ba27bcde901e 100644
    --- a/drivers/net/ipa/ipa_main.c
    +++ b/drivers/net/ipa/ipa_main.c
    @@ -679,6 +679,7 @@ static int ipa_firmware_load(struct device *dev)
    }

    ret = of_address_to_resource(node, 0, &res);
    + of_node_put(node);
    if (ret) {
    dev_err(dev, "error %d getting \"memory-region\" resource\n",
    ret);
    --
    2.30.2
    \
     
     \ /
      Last update: 2021-07-06 14:11    [W:4.038 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site