]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: sunplus: add missing of_node_put() in spl2sw_mdio_init()
authorYang Yingliang <yangyingliang@huawei.com>
Wed, 18 May 2022 02:08:12 +0000 (10:08 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 May 2022 13:08:49 +0000 (14:08 +0100)
commit7756b8b915181a6a4f80d5f2d7264915a6220500
tree72082ff3469e950ac7b5106bf750fc285d46c0ae
parent7cbe7e6222c485d27727fbfbb181dda43b398f9e
net: ethernet: sunplus: add missing of_node_put() in spl2sw_mdio_init()

of_get_child_by_name() returns device node pointer with refcount
incremented. The refcount should be decremented before returning
from spl2sw_mdio_init().

Fixes: 22c7792aa072 ("net: ethernet: Add driver for Sunplus SP7021")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Wells Lu <wellslutw@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sunplus/spl2sw_mdio.c