diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2016-02-26 00:13:55 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-26 06:38:16 (GMT) |
commit | 284ea26aaaceeb251b350d78faa19ecd2fa450ce (patch) | |
tree | 799a289a351c0ac09f27fbe9ce4a8440581f9187 /drivers/staging/octeon-usb | |
parent | 25adcca6ec76a4136b54eb9fe80e3fce97c744f3 (diff) | |
download | linux-284ea26aaaceeb251b350d78faa19ecd2fa450ce.tar.xz |
staging: octeon-usb: simplify if statement
Simplify if statement to avoid deep nesting.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/octeon-usb')
-rw-r--r-- | drivers/staging/octeon-usb/octeon-hcd.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index 726ec5d..39854ab 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.c +++ b/drivers/staging/octeon-usb/octeon-hcd.c @@ -2768,26 +2768,23 @@ static int cvmx_usb_poll_channel(struct cvmx_usb_state *usb, int channel) */ if (cvmx_usb_pipe_needs_split(usb, pipe)) { if (transaction->stage == - CVMX_USB_STAGE_NON_CONTROL) + CVMX_USB_STAGE_NON_CONTROL) { transaction->stage = CVMX_USB_STAGE_NON_CONTROL_SPLIT_COMPLETE; - else { - if (buffer_space_left && - (bytes_in_last_packet == - pipe->max_packet)) - transaction->stage = - CVMX_USB_STAGE_NON_CONTROL; - else { - if (transaction->type == - CVMX_USB_TRANSFER_INTERRUPT) - pipe->next_tx_frame += - pipe->interval; - cvmx_usb_perform_complete( - usb, - pipe, - transaction, - CVMX_USB_COMPLETE_SUCCESS); - } + } else if (buffer_space_left && + (bytes_in_last_packet == + pipe->max_packet)) { + transaction->stage = + CVMX_USB_STAGE_NON_CONTROL; + } else { + if (transaction->type == + CVMX_USB_TRANSFER_INTERRUPT) + pipe->next_tx_frame += + pipe->interval; + cvmx_usb_perform_complete(usb, + pipe, + transaction, + CVMX_USB_COMPLETE_SUCCESS); } } else { if ((pipe->device_speed == |