]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
usb: typec: ucsi: Correct teardown ordering in ucsi_init() error path
authorAndrei Kuchynski <akuchynski@chromium.org>
Fri, 17 Jul 2026 10:46:14 +0000 (10:46 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jul 2026 08:38:19 +0000 (10:38 +0200)
commitfb0bf289f5d529336ef490c8273e88a8a8b29f69
tree6fbf5d79bd455d7c9abff685038619606387fe48
parent71132cedd1ecbc4032d76e9928c18a10f7e39b80
usb: typec: ucsi: Correct teardown ordering in ucsi_init() error path

The commit 7aa7d4bf9d3f ("usb: typec: ucsi: Fix race condition and
ordering in port unregistration") consolidated port teardown into the
ucsi_unregister_port() helper. However, it introduced an ordering problem
in the ucsi_init() error path.

Fix this by ensuring ucsi_unregister_port() is called before we unregister
their corresponding lockdep keys.

Cc: stable@vger.kernel.org
Fixes: 7aa7d4bf9d3f ("usb: typec: ucsi: Fix race condition and ordering in port unregistration")
Reported-by: "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com>
Closes: https://lore.kernel.org/all/22064276-6c56-411a-9f20-6917ceeb865f@intel.com/
Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org>
Tested-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://patch.msgid.link/20260717104614.325250-1-akuchynski@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi.c