Skip to content

Commit b8ee7a1

Browse files
javiercarrascocruzdavem330
authored andcommitted
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: 94a2a84 ("net: dsa: mv88e6xxx: Support LED control") Signed-off-by: Javier Carrasco <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 788d5d6 commit b8ee7a1

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/dsa/mv88e6xxx

1 file changed

+1
-0
lines changed

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3379,6 +3379,7 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port)
33793379
break;
33803380
}
33813381
}
3382+
fwnode_handle_put(ports_fwnode);
33823383
} else {
33833384
dev_dbg(chip->dev, "no ethernet ports node defined for the device\n");
33843385
}

0 commit comments

Comments
 (0)