Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c085e4df authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix a NULL-pointer check order reverse in GATTC_ConfigureMTU"

parents 540bd3e7 caea3731
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -652,15 +652,15 @@ tGATT_STATUS GATTC_ConfigureMTU (uint16_t conn_id, uint16_t mtu)

    GATT_TRACE_API ("GATTC_ConfigureMTU conn_id=%d mtu=%d", conn_id, mtu );

    /* Validate that the link is BLE, not BR/EDR */
    if (p_tcb->transport != BT_TRANSPORT_LE)
    if ( (p_tcb == NULL) || (p_reg == NULL) || (mtu < GATT_DEF_BLE_MTU_SIZE) || (mtu > GATT_MAX_MTU_SIZE))
    {
        return GATT_ERROR;
        return GATT_ILLEGAL_PARAMETER;
    }

    if ( (p_tcb == NULL) || (p_reg==NULL) || (mtu < GATT_DEF_BLE_MTU_SIZE) || (mtu > GATT_MAX_MTU_SIZE))
    /* Validate that the link is BLE, not BR/EDR */
    if (p_tcb->transport != BT_TRANSPORT_LE)
    {
        return GATT_ILLEGAL_PARAMETER;
        return GATT_ERROR;
    }

    if (gatt_is_clcb_allocated(conn_id))