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

Commit 284ea26a authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman
Browse files

staging: octeon-usb: simplify if statement



Simplify if statement to avoid deep nesting.

Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 25adcca6
Loading
Loading
Loading
Loading
+15 −18
Original line number Original line Diff line number Diff line
@@ -2768,27 +2768,24 @@ static int cvmx_usb_poll_channel(struct cvmx_usb_state *usb, int channel)
			 */
			 */
			if (cvmx_usb_pipe_needs_split(usb, pipe)) {
			if (cvmx_usb_pipe_needs_split(usb, pipe)) {
				if (transaction->stage ==
				if (transaction->stage ==
				    CVMX_USB_STAGE_NON_CONTROL)
				    CVMX_USB_STAGE_NON_CONTROL) {
					transaction->stage =
					transaction->stage =
						CVMX_USB_STAGE_NON_CONTROL_SPLIT_COMPLETE;
						CVMX_USB_STAGE_NON_CONTROL_SPLIT_COMPLETE;
				else {
				} else if (buffer_space_left &&
					if (buffer_space_left &&
					   (bytes_in_last_packet ==
					   (bytes_in_last_packet ==
					     pipe->max_packet))
					   pipe->max_packet)) {
					transaction->stage =
					transaction->stage =
						CVMX_USB_STAGE_NON_CONTROL;
						CVMX_USB_STAGE_NON_CONTROL;
					else {
				} else {
					if (transaction->type ==
					if (transaction->type ==
					    CVMX_USB_TRANSFER_INTERRUPT)
					    CVMX_USB_TRANSFER_INTERRUPT)
						pipe->next_tx_frame +=
						pipe->next_tx_frame +=
							pipe->interval;
							pipe->interval;
							cvmx_usb_perform_complete(
					cvmx_usb_perform_complete(usb,
								usb,
								  pipe,
								  pipe,
								  transaction,
								  transaction,
								  CVMX_USB_COMPLETE_SUCCESS);
								  CVMX_USB_COMPLETE_SUCCESS);
				}
				}
				}
			} else {
			} else {
				if ((pipe->device_speed ==
				if ((pipe->device_speed ==
				     CVMX_USB_SPEED_HIGH) &&
				     CVMX_USB_SPEED_HIGH) &&