]> www.infradead.org Git - users/dwmw2/linux.git/commit
ethernet: Fix error handling in xemaclite_of_probe
authorMiaoqian Lin <linmq006@gmail.com>
Tue, 8 Mar 2022 02:47:49 +0000 (02:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Mar 2022 13:15:58 +0000 (14:15 +0100)
commit979b418b96e35f07136f77962ccfaa54cf3e30e1
tree87abe7ff2f7c2c2ac1143edf938755e2cb5a2621
parent506d61bc1b50f2f5166d1bf7c2958e243e722c92
ethernet: Fix error handling in xemaclite_of_probe

[ Upstream commit b19ab4b38b06aae12442b2de95ccf58b5dc53584 ]

This node pointer is returned by of_parse_phandle() with refcount
incremented in this function. Calling of_node_put() to avoid the
refcount leak. As the remove function do.

Fixes: 5cdaaa12866e ("net: emaclite: adding MDIO and phy lib support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220308024751.2320-1-linmq006@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/xilinx/xilinx_emaclite.c