Merge "usb: pd: Clear vdm_tx if SVDM message is sent on SOP'"
This commit is contained in:
commit
2e616bbbc3
1 changed files with 5 additions and 1 deletions
|
@ -1721,8 +1721,12 @@ static void handle_vdm_tx(struct usbpd *pd, enum pd_sop_type sop_type)
|
|||
|
||||
mutex_unlock(&pd->svid_handler_lock);
|
||||
/* retry when hitting PE_SRC/SNK_Ready again */
|
||||
if (ret != -EBUSY && sop_type == SOP_MSG)
|
||||
if (ret != -EBUSY && sop_type == SOP_MSG) {
|
||||
usbpd_set_state(pd, PE_SEND_SOFT_RESET);
|
||||
} else if (sop_type != SOP_MSG) {
|
||||
kfree(pd->vdm_tx);
|
||||
pd->vdm_tx = NULL;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue