Commit 312d7966 authored by Andrei Kuchynski's avatar Andrei Kuchynski Committed by Greg Kroah-Hartman
Browse files

usb: typec: ucsi: displayport: Fix NULL pointer access



This patch ensures that the UCSI driver waits for all pending tasks in the
ucsi_displayport_work workqueue to finish executing before proceeding with
the partner removal.

Cc: stable <stable@kernel.org>
Fixes: af8622f6 ("usb: typec: ucsi: Support for DisplayPort alt mode")
Signed-off-by: default avatarAndrei Kuchynski <akuchynski@chromium.org>
Reviewed-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: default avatarBenson Leung <bleung@chromium.org>
Link: https://lore.kernel.org/r/20250424084429.3220757-3-akuchynski@chromium.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 364618c8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -299,6 +299,8 @@ void ucsi_displayport_remove_partner(struct typec_altmode *alt)
	if (!dp)
		return;

	cancel_work_sync(&dp->work);

	dp->data.conf = 0;
	dp->data.status = 0;
	dp->initialized = false;