linux/drivers/usb/typec
Joe Hattori 569793fc68 usb: typec: anx7411: fix OF node reference leaks in anx7411_typec_switch_probe()
commit ef42b906df upstream.

The refcounts of the OF nodes obtained by of_get_child_by_name() calls
in anx7411_typec_switch_probe() are not decremented. Replace them with
device_get_named_child_node() calls and store the return values to the
newly created fwnode_handle fields in anx7411_data, and call
fwnode_handle_put() on them in the error path and in the unregister
functions.

Fixes: e45d7337dc ("usb: typec: anx7411: Use of_get_child_by_name() instead of of_find_node_by_name()")
Cc: stable@vger.kernel.org
Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20241126014909.3687917-1-joe@pf.is.s.u-tokyo.ac.jp
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-12-19 18:08:49 +01:00
..
altmodes usb: typec: altmodes/displayport: Signal hpd low when exiting mode 2023-10-19 23:08:58 +02:00
mux usb: typec: intel_pmc_mux: Don't leak the ACPI device reference count 2023-03-10 09:33:31 +01:00
tcpm mfd: intel_soc_pmic_bxtwc: Use IRQ domain for USB Type-C device 2024-12-14 19:53:35 +01:00
tipd usb: typec: tipd: fix event checking for tps6598x 2024-05-25 16:21:35 +02:00
ucsi usb: typec: fix potential out of bounds in ucsi_ccg_update_set_new_cam_cmd() 2024-11-14 13:15:18 +01:00
anx7411.c usb: typec: anx7411: fix OF node reference leaks in anx7411_typec_switch_probe() 2024-12-19 18:08:49 +01:00
bus.c usb: typec: bus: verify partner exists in typec_altmode_attention 2023-09-13 09:43:04 +02:00
bus.h usb: typec: Organize the private headers properly 2021-04-05 09:07:41 +02:00
class.c usb: typec: fix unreleased fwnode_handle in typec_port_register_altmodes() 2024-11-08 16:26:44 +01:00
class.h usb: typec: Add retimer handle to port 2022-07-14 16:24:05 +02:00
hd3ss3220.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
Kconfig usb: typec: anx7411: Fix build error without CONFIG_POWER_SUPPLY 2022-09-22 15:21:03 +02:00
Makefile usb: typec: Add support for retimers 2022-07-14 16:24:05 +02:00
mux.c usb: typec: Replace custom implementation of device_match_fwnode() 2022-09-30 13:55:13 +02:00
mux.h usb: typec: mux: Introduce indirection 2022-04-26 13:47:13 +02:00
pd.c usb: typec: Fix fast_role_swap_current show function 2023-06-21 16:00:57 +02:00
pd.h usb: typec: Separate USB Power Delivery from USB Type-C 2022-06-12 06:49:47 +02:00
port-mapper.c ACPI: bus: Introduce acpi_bus_for_each_dev() 2022-03-02 20:55:47 +01:00
qcom-pmic-typec.c usb: typec: qcom-pmic-typec: Switch to use dev_err_probe() helper 2022-09-27 10:35:46 +02:00
retimer.c usb: typec: Replace custom implementation of device_match_fwnode() 2022-09-30 13:55:13 +02:00
retimer.h usb: typec: Add support for retimers 2022-07-14 16:24:05 +02:00
rt1719.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
stusb160x.c USB/Thunderbolt changes for 6.1-rc1 2022-10-07 16:48:26 -07:00
wusb3801.c usb: typec: wusb3801: fix fwnode refcount leak in wusb3801_probe() 2022-12-31 13:32:42 +01:00