mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 04:06:26 +00:00
usb: typec: fix unreleased fwnode_handle in typec_port_register_altmodes()
The 'altmodes_node' fwnode_handle is never released after it is no
longer required, which leaks the resource.
Add the required call to fwnode_handle_put() when 'altmodes_node' is no
longer required.
Cc: stable@vger.kernel.org
Fixes: 7b458a4c5d
("usb: typec: Add typec_port_register_altmodes()")
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20241021-typec-class-fwnode_handle_put-v2-1-3281225d3d27@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b8423a2f58
commit
9581acb91e
@ -2341,6 +2341,7 @@ void typec_port_register_altmodes(struct typec_port *port,
|
||||
altmodes[index] = alt;
|
||||
index++;
|
||||
}
|
||||
fwnode_handle_put(altmodes_node);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(typec_port_register_altmodes);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user