net: dsa: mv88e6xxx: fix unreleased fwnode_handle in setup_port()
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Sat, 19 Oct 2024 20:16:49 +0000 (22:16 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Oct 2024 13:27:34 +0000 (13:27 +0000)
commitb8ee7a11c75436b85fa1641aa5f970de0f8a575c
tree68199af684014a968715a0e6317ee5cfb3cb9974
parent788d5d655bc94ded8a2b550caa03ba4c255c55eb
net: dsa: mv88e6xxx: fix unreleased fwnode_handle in setup_port()

'ports_fwnode' is initialized via device_get_named_child_node(), which
requires a call to fwnode_handle_put() when the variable is no longer
required to avoid leaking memory.

Add the missing fwnode_handle_put() after 'ports_fwnode' has been used
and is no longer required.

Fixes: 94a2a84f5e9e ("net: dsa: mv88e6xxx: Support LED control")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c