staging: octeon-usb: move next pipe selection into a separate function