Loading drivers/usb/pd/policy_engine.c +12 −11 Original line number Diff line number Diff line Loading @@ -1304,8 +1304,13 @@ int usbpd_send_vdm(struct usbpd *pd, u32 vdm_hdr, const u32 *vdos, int num_vdos) { struct vdm_tx *vdm_tx; if (pd->vdm_tx) return -EBUSY; if (pd->vdm_tx) { usbpd_warn(&pd->dev, "Discarding previously queued VDM tx (SVID:0x%04x)\n", VDM_HDR_SVID(pd->vdm_tx->data[0])); kfree(pd->vdm_tx); pd->vdm_tx = NULL; } vdm_tx = kzalloc(sizeof(*vdm_tx), GFP_KERNEL); if (!vdm_tx) Loading Loading @@ -1523,17 +1528,13 @@ static void handle_vdm_rx(struct usbpd *pd, struct rx_msg *rx_msg) return; } /* if this interrupts a previous exchange, abort queued response */ if (cmd_type == SVDM_CMD_TYPE_INITIATOR && pd->vdm_tx) { usbpd_dbg(&pd->dev, "Discarding previously queued SVDM tx (SVID:0x%04x)\n", VDM_HDR_SVID(pd->vdm_tx->data[0])); kfree(pd->vdm_tx); pd->vdm_tx = NULL; } if (handler && handler->svdm_received) { handler->svdm_received(handler, cmd, cmd_type, vdos, num_vdos); /* handle any previously queued TX */ if (pd->vdm_tx && !pd->sm_queued) kick_sm(pd, 0); return; } Loading Loading
drivers/usb/pd/policy_engine.c +12 −11 Original line number Diff line number Diff line Loading @@ -1304,8 +1304,13 @@ int usbpd_send_vdm(struct usbpd *pd, u32 vdm_hdr, const u32 *vdos, int num_vdos) { struct vdm_tx *vdm_tx; if (pd->vdm_tx) return -EBUSY; if (pd->vdm_tx) { usbpd_warn(&pd->dev, "Discarding previously queued VDM tx (SVID:0x%04x)\n", VDM_HDR_SVID(pd->vdm_tx->data[0])); kfree(pd->vdm_tx); pd->vdm_tx = NULL; } vdm_tx = kzalloc(sizeof(*vdm_tx), GFP_KERNEL); if (!vdm_tx) Loading Loading @@ -1523,17 +1528,13 @@ static void handle_vdm_rx(struct usbpd *pd, struct rx_msg *rx_msg) return; } /* if this interrupts a previous exchange, abort queued response */ if (cmd_type == SVDM_CMD_TYPE_INITIATOR && pd->vdm_tx) { usbpd_dbg(&pd->dev, "Discarding previously queued SVDM tx (SVID:0x%04x)\n", VDM_HDR_SVID(pd->vdm_tx->data[0])); kfree(pd->vdm_tx); pd->vdm_tx = NULL; } if (handler && handler->svdm_received) { handler->svdm_received(handler, cmd, cmd_type, vdos, num_vdos); /* handle any previously queued TX */ if (pd->vdm_tx && !pd->sm_queued) kick_sm(pd, 0); return; } Loading