linux-stable/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 usb: typec: displayport: drop driver owner assignment 2024-04-04 17:06:48 +02:00
mux Merge 6.9-rc5 into usb-next 2024-04-23 13:33:26 +02:00
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
anx7411.c usb: typec: drop check because i2c_unregister_device() is NULL safe 2023-10-02 13:56:37 +02:00
bus.c usb: typec: altmodes: add typec_cable_ops to typec_altmode 2024-01-27 17:38:25 -08:00
bus.h USB: mark all struct bus_type as const 2023-03-23 13:22:00 +01:00
class.c usb: typec: Return size of buffer if pd_set operation succeeds 2024-03-26 14:59:13 +01:00
class.h usb: typec: constify struct class usage 2024-03-02 20:21:06 +01:00
hd3ss3220.c usb: Switch i2c drivers back to use .probe() 2023-05-29 15:53:11 +01:00
Kconfig usb: typec: qcom: Add Qualcomm PMIC Type-C driver 2023-05-13 19:03:46 +09:00
Makefile usb: typec: qcom: Add Qualcomm PMIC Type-C driver 2023-05-13 19:03:46 +09:00
mux.c usb: typec: constify struct class usage 2024-03-02 20:21:06 +01:00
mux.h usb: typec: mux: Introduce indirection 2022-04-26 13:47:13 +02:00
pd.c usb: typec: constify the struct device_type usage 2024-02-19 09:35:46 +01:00
pd.h usb: typec: Separate USB Power Delivery from USB Type-C 2022-06-12 06:49:47 +02:00
port-mapper.c usb: typec: Link enumerated USB devices with Type-C partner 2023-10-16 20:02:36 +02:00
retimer.c usb: typec: constify struct class usage 2024-03-02 20:21:06 +01:00
retimer.h usb: typec: Make bus switch code retimer-aware 2023-01-17 17:29:00 +01:00
rt1719.c usb: Switch i2c drivers back to use .probe() 2023-05-29 15:53:11 +01:00
stusb160x.c usb: typec: stusb160x: convert to use maple tree register cache 2024-03-26 10:43:52 +01:00
wusb3801.c usb: Switch i2c drivers back to use .probe() 2023-05-29 15:53:11 +01:00