Skip to content

Commit

Permalink
net: ipa: Add missing of_node_put() in ipa_firmware_load()
Browse files Browse the repository at this point in the history
[ Upstream commit b244163 ]

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>
  • Loading branch information
Yang Yingliang authored and gregkh committed Jul 19, 2021
1 parent 5cc0cf7 commit d2801d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ipa/ipa_main.c
Expand Up @@ -589,6 +589,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);
Expand Down

0 comments on commit d2801d1

Please sign in to comment.