]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: typec: use cleanup facility for 'altmodes_node'
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Mon, 21 Oct 2024 20:45:30 +0000 (22:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Oct 2024 03:28:51 +0000 (04:28 +0100)
commit1ab0b9ae587373f9f800b6fda01b8faf02b3530b
treee209c929adf593b54b8e9023046d47aa514a9835
parent9581acb91eaf5bbe70086bbb6fca808220d358ba
usb: typec: use cleanup facility for 'altmodes_node'

Use the __free() macro for 'altmodes_node' to automatically release the
node when it goes out of scope, removing the need for explicit calls to
fwnode_handle_put().

Suggested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20241021-typec-class-fwnode_handle_put-v2-2-3281225d3d27@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/class.c