diff options
author | Miaoqian Lin <linmq006@gmail.com> | 2022-06-07 07:11:43 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-06-14 17:53:59 +0300 |
commit | 1fd12298a0e0ca23478c715e672ee64c85670584 (patch) | |
tree | c0aff3c77e10cdd66c83458a5b3053d4c91bd86d /lib/memory-notifier-error-inject.c | |
parent | 64aef8efe96c1616142c4476a05731306fc4494e (diff) | |
download | linux-1fd12298a0e0ca23478c715e672ee64c85670584.tar.xz |
net: altera: Fix refcount leak in altera_tse_mdio_create
[ Upstream commit 11ec18b1d8d92b9df307d31950dcba0b3dd7283c ]
Every iteration of for_each_child_of_node() decrements
the reference count of the previous node.
When break from a for_each_child_of_node() loop,
we need to explicitly call of_node_put() on the child node when
not need anymore.
Add missing of_node_put() to avoid refcount leak.
Fixes: bbd2190ce96d ("Altera TSE: Add main and header file for Altera Ethernet Driver")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220607041144.7553-1-linmq006@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions