linux/drivers/usb
GONG Ruiqi 976544bdb4 usb: typec: fix pm usage counter imbalance in ucsi_ccg_sync_control()
commit b0e525d7a2 upstream.

The error handling for the case `con_index == 0` should involve dropping
the pm usage counter, as ucsi_ccg_sync_control() gets it at the
beginning. Fix it.

Cc: stable <stable@kernel.org>
Fixes: e56aac6e5a ("usb: typec: fix potential array underflow in ucsi_ccg_sync_control()")
Signed-off-by: GONG Ruiqi <gongruiqi1@huawei.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250107015750.2778646-1-gongruiqi1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-01-17 13:40:55 +01:00
..
atm move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
c67x00 USB: c67x00: Remove unused declaration c67x00_hcd_msg_received() 2023-10-02 16:42:33 +02:00
cdns3 sub: cdns3: Use predefined PCI vendor ID constant 2024-09-13 15:39:06 +02:00
chipidea usb: chipidea: ci_hdrc_imx: decrement device's refcount in .remove() and in the error path of .probe() 2025-01-17 13:40:54 +01:00
class USB: usblp: return error when setting unsupported protocol 2025-01-17 13:40:54 +01:00
common usb: common: Switch to device_property_match_property_string() 2024-09-11 15:34:34 +02:00
core usb: fix reference leak in usb_new_device() 2025-01-17 13:40:54 +01:00
dwc2 usb: dwc2: Fix HCD port connection race 2024-12-19 18:13:04 +01:00
dwc3 usb: dwc3-am62: Disable autosuspend during remove 2025-01-17 13:40:54 +01:00
early usb: early: xhci-dbc: Use memcpy_and_pad() 2023-01-31 10:40:54 +01:00
fotg210 move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
gadget usb: gadget: configfs: Ignore trailing LF for user strings to cdev 2025-01-17 13:40:55 +01:00
host usb: host: xhci-plat: set skip_phy_initialization if software node has XHCI_SKIP_PHY_INIT property 2025-01-17 13:40:55 +01:00
image scsi: core: Add a dma_alignment field to the host and host template 2024-04-11 21:37:48 -04:00
isp1760 move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
misc usb: misc: onboard_usb_dev: skip suspend/resume sequence for USB5744 SMBus support 2024-12-19 18:12:58 +01:00
mon [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
mtu3 tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
musb usb: musb: Fix hardware lockup on first Rx endpoint request 2024-12-05 14:03:00 +01:00
phy usb: phy: Fix API devm_usb_put_phy() can not release the phy 2024-10-29 04:37:48 +01:00
renesas_usbhs usb: renesas_usbhs: Remove renesas_usbhs_get_info() wrapper 2024-04-18 16:47:49 +02:00
roles usb: roles: Improve the fix for a false positive recursive locking complaint 2024-09-13 07:36:02 +02:00
serial USB: serial: cp210x: add Phoenix Contact UPS Device 2025-01-17 13:40:52 +01:00
storage usb-storage: Add max sectors quirk for Nokia 208 2025-01-17 13:40:52 +01:00
typec usb: typec: fix pm usage counter imbalance in ucsi_ccg_sync_control() 2025-01-17 13:40:55 +01:00
usbip Merge 6.11-rc3 into usb-next 2024-08-12 18:49:00 +02:00
Kconfig usb: pci-quirks: handle HAS_IOPORT dependency for AMD quirk 2023-10-02 16:19:12 +02:00
Makefile USB: xen-hcd: Traverse host/ when CONFIG_USB_XEN_HCD is selected 2024-06-04 15:33:38 +02:00
usb-skeleton.c usb: add usb_set_intfdata() documentation 2022-11-29 08:56:09 +01:00