linux/drivers/usb/typec
Javier Carrasco c68942624e usb: typec: ucsi: glink: fix child node release in probe function
The device_for_each_child_node() macro requires explicit calls to
fwnode_handle_put() in all early exits of the loop if the child node is
not required outside. Otherwise, the child node's refcount is not
decremented and the resource is not released.

The current implementation of pmic_glink_ucsi_probe() makes use of the
device_for_each_child_node(), but does not release the child node on
early returns. Add the missing calls to fwnode_handle_put().

Cc: stable@vger.kernel.org
Fixes: c6165ed2f4 ("usb: ucsi: glink: use the connector orientation GPIO to provide switch events")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240613-ucsi-glink-release-node-v1-1-f7629a56f70a@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-20 19:36:29 +02:00
..
altmodes
mux
tcpm usb: typec: tcpm: Ignore received Hard Reset in TOGGLING state 2024-06-04 15:34:12 +02:00
tipd usb: typec: tipd: rely on i2c_get_match_data() 2024-05-10 10:36:51 +01:00
ucsi usb: typec: ucsi: glink: fix child node release in probe function 2024-06-20 19:36:29 +02:00
Kconfig
Makefile
anx7411.c
bus.c
bus.h
class.c
class.h
hd3ss3220.c
mux.c
mux.h
pd.c
pd.h
port-mapper.c
retimer.c
retimer.h
rt1719.c
stusb160x.c
wusb3801.c