summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-06-17 08:11:19 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-17 21:34:25 +0300
commitb244163f2c45c12053cb0291c955f892e79ed8a9 (patch)
tree5d9dada7cb3f1987d13814a22af1ffdf689af6f2
parent2d8ea148e553e1dd4e80a87741abdfb229e2b323 (diff)
downloadlinux-b244163f2c45c12053cb0291c955f892e79ed8a9.tar.xz
net: ipa: Add missing of_node_put() in ipa_firmware_load()
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>
-rw-r--r--drivers/net/ipa/ipa_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c
index 2243e3e5b7ea..f82130db32f6 100644
--- a/drivers/net/ipa/ipa_main.c
+++ b/drivers/net/ipa/ipa_main.c
@@ -530,6 +530,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);