diff options
author | Javier Carrasco <javier.carrasco.cruz@gmail.com> | 2024-10-19 22:16:49 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-10-28 13:27:34 +0000 |
commit | b8ee7a11c75436b85fa1641aa5f970de0f8a575c (patch) | |
tree | 68199af684014a968715a0e6317ee5cfb3cb9974 /drivers | |
parent | 788d5d655bc94ded8a2b550caa03ba4c255c55eb (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 4f5193d86e65..c75005b4d86e 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3379,6 +3379,7 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port) break; } } + fwnode_handle_put(ports_fwnode); } else { dev_dbg(chip->dev, "no ethernet ports node defined for the device\n"); } |