]> git.baikalelectronics.ru Git - kernel.git/commit
usb: typec: ucsi: Fix reuse of completion structure
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Tue, 5 Apr 2022 13:48:23 +0000 (16:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Apr 2022 16:33:10 +0000 (18:33 +0200)
commit797b9f3b4cdb5811b0b02d327064f32c5bd9a6df
treec62859ec09bf695eeb298cdcc4cf50cbcd85ebe9
parentfbc7ff58bca787d683d411460ed78bad659909c0
usb: typec: ucsi: Fix reuse of completion structure

The role swapping completion variable is reused, so it needs
to be reinitialised every time. Otherwise it will be marked
as done after the first time it's used and completing
immediately.

Link: https://lore.kernel.org/linux-usb/20220325203959.GA19752@jackp-linux.qualcomm.com/
Fixes: 216fc2dfa2e8 ("usb: typec: ucsi: Start using struct typec_operations")
Cc: stable@vger.kernel.org
Reported-and-suggested-by: Jack Pham <quic_jackp@quicinc.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20220405134824.68067-2-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi.c