]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: rzn1-a5psw: add missing of_node_put() in a5psw_pcs_get()
authorYang Yingliang <yangyingliang@huawei.com>
Thu, 30 Jun 2022 01:41:53 +0000 (09:41 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 1 Jul 2022 04:07:03 +0000 (21:07 -0700)
commitf3e9c34e1c5492018cd54bb7b1f7eb2c174af62a
treefa1f02572cfe9bad9939a526ced47eda3c8ae033
parent0787898f90a8e145b207af5e7b68f01c1d1dfdcc
net: dsa: rzn1-a5psw: add missing of_node_put() in a5psw_pcs_get()

of_parse_phandle() will increase the refcount of 'pcs_node', so add
of_node_put() before return from a5psw_pcs_get().

Fixes: 82752fa04815 ("net: dsa: rzn1-a5psw: add Renesas RZ/N1 advanced 5 port switch driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220630014153.1888811-1-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/rzn1_a5psw.c