linux-stable/drivers/usb
Yang Yingliang 82d1211f67 usb: typec: wusb3801: fix fwnode refcount leak in wusb3801_probe()
[ Upstream commit dc18a4c7b3 ]

I got the following report while doing fault injection test:

  OF: ERROR: memory leak, expected refcount 1 instead of 4,
  of_node_get()/of_node_put() unbalanced - destroy cset entry:
  attach overlay node /i2c/tcpc@60/connector

If wusb3801_hw_init() fails, fwnode_handle_put() needs be called to
avoid refcount leak.

Fixes: d016cbe4d7 ("usb: typec: Support the WUSB3801 port controller")
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221203071027.3808308-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:32:42 +01:00
..
atm usb: move from strlcpy with unused retval to strscpy 2022-08-19 11:08:54 +02:00
c67x00 USB: c67x00: remove unnecessary check of res 2022-05-12 11:36:46 +02:00
cdns3 usb: cdnsp: fix issue with ZLP - added TD_SIZE = 1 2022-11-22 16:52:05 +01:00
chipidea usb: chipidea: fix deadlock in ci_otg_del_timer 2022-11-09 12:34:18 +01:00
class USB/Thunderbolt changes for 6.1-rc1 2022-10-07 16:48:26 -07:00
common usb: ulpi: use DEFINE_SHOW_ATTRIBUTE to simplify ulpi_regs 2022-09-27 10:36:54 +02:00
core usb: core: hcd: Fix return value check in usb_hcd_setup_local_mem() 2022-12-31 13:32:41 +01:00
dwc2 usb: dwc2: Remove redundant license text 2022-09-22 15:52:29 +02:00
dwc3 usb: dwc3: pci: Update PCIe device ID for USB3 controller on CPU sub-system for Raptor Lake 2022-12-21 17:48:10 +01:00
early
gadget usb: gadget: f_hid: fix refcount leak on error path 2022-12-31 13:32:41 +01:00
host xhci: Apply XHCI_RESET_TO_DEFAULT quirk to ADL-N 2022-12-21 17:48:09 +01:00
image usb/image: fix repeated words in comments 2022-07-27 14:33:53 +02:00
isp1760 usb: isp1760: Fix out-of-bounds array access 2022-05-19 18:10:59 +02:00
misc fbdev: sisfb: use explicitly signed char 2022-10-24 20:28:41 +02:00
mon usb: mon: make mmapped memory read only 2022-09-22 15:52:29 +02:00
mtu3 usb: mtu3: fix failed runtime suspend in host only mode 2022-09-30 13:55:48 +02:00
musb usb: musb: omap2430: Fix probe regression for missing resources 2022-12-31 13:32:39 +01:00
phy USB/Thunderbolt changes for 6.1-rc1 2022-10-07 16:48:26 -07:00
renesas_usbhs usb: renesas: Fix refcount leak bug 2022-06-21 16:39:03 +02:00
roles usb: roles: fix of node refcount leak in usb_role_switch_is_parent() 2022-12-31 13:32:41 +01:00
serial USB: serial: f81534: fix division by zero on line-speed change 2022-12-21 17:48:08 +01:00
storage usb: storage: Add check for kcalloc 2022-12-31 13:32:42 +01:00
typec usb: typec: wusb3801: fix fwnode refcount leak in wusb3801_probe() 2022-12-31 13:32:42 +01:00
usbip usbip: add USBIP_URB_* URB transfer flags 2022-08-31 09:07:53 +02:00
Kconfig
Makefile
usb-skeleton.c