Changeset 2c091a6 in mainline


Ignore:
Timestamp:
2017-10-22T10:02:38Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a4e26882
Parents:
2e5aea1
Message:

xhci ep: fixed error path

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/endpoint.c

    r2e5aea1 r2c091a6  
    203203        // Prepare input context.
    204204        xhci_input_ctx_t *ictx = malloc32(sizeof(xhci_input_ctx_t));
    205         const unsigned ep_idx = xhci_endpoint_index(ep);
    206205        if (!ictx)
    207206                goto err;
     
    214213        XHCI_INPUT_CTRL_CTX_DROP_CLEAR(ictx->ctrl_ctx, 1);
    215214        XHCI_INPUT_CTRL_CTX_ADD_SET(ictx->ctrl_ctx, 0);
     215
     216        const unsigned ep_idx = xhci_endpoint_index(ep);
    216217        XHCI_INPUT_CTRL_CTX_ADD_SET(ictx->ctrl_ctx, ep_idx + 1); /* Preceded by slot ctx */
    217218
     
    255256        free32(ictx);
    256257err:
    257         dev->endpoints[ep_idx] = NULL;
     258        dev->endpoints[ep_num] = NULL;
    258259        dev->active_endpoint_count--;
    259260        return err;
Note: See TracChangeset for help on using the changeset viewer.