Commit 878e9cb0 authored by GONG Ruiqi's avatar GONG Ruiqi Committed by Greg Kroah-Hartman
Browse files

usb: typec: fix pm usage counter imbalance in ucsi_ccg_sync_control()



commit b0e525d7 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: e56aac6e ("usb: typec: fix potential array underflow in ucsi_ccg_sync_control()")
Signed-off-by: default avatarGONG Ruiqi <gongruiqi1@huawei.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250107015750.2778646-1-gongruiqi1@huawei.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
[Minor context change fixed.]
Signed-off-by: default avatarBin Lan <bin.lan.cn@windriver.com>
Signed-off-by: default avatarHe Zhe <zhe.he@windriver.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 627c2a50
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment