[PATCH] usb: typec: tipd: Zero-initialize CD321x partner descriptor

From: Sven Peter

Date: Sun Sep 06 2026 - 08:44:29 EST


The typec_partner_desc struct isn't initialized and instead filled with
whatever values happen to be on the stack. We especially don't overwrite
the attach/detach callbacks. Just zero initialize it to make sure we don't
run into weird issues in the future.

Fixes: 82432bbfb9e8 ("usb: typec: tipd: Handle mode transitions for CD321x")
Signed-off-by: Sven Peter <sven@xxxxxxxxxx>
---
I deliberately didn't cc stable@ since we can't even reach the path
that would try to run these callbacks on platforms where this is used.
Just noticed this while working on the USB4/Thunderbolt series for Apple
Silicon.
---
drivers/usb/typec/tipd/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
index 522f56742aa9..07d6d88e3a0e 100644
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -841,7 +841,7 @@ static void cd321x_update_work(struct work_struct *work)

/* Set up partner if we were previously disconnected (or changed). */
if (!tps->partner) {
- struct typec_partner_desc desc;
+ struct typec_partner_desc desc = { };

desc.usb_pd = is_pd;
desc.accessory = TYPEC_ACCESSORY_NONE; /* XXX: handle accessories */

---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20260906-b4-tipd-partner-desc-07915a127b0a

Best regards,
--
Sven Peter <sven@xxxxxxxxxx>