[PATCH v5] Staging: octeon-usb: Using defined error codes and applying coding style.

From: Georgios Tsotsos
Date: Sun Jul 29 2018 - 18:31:08 EST


Replaced -1 with defined error code EINVAL

Signed-off-by: Georgios Tsotsos <tsotsos@xxxxxxxxx>
---
v2: Apply coding style to function cvmx_usb_poll_channel
v3: Break down function cvmx_usb_poll_channel
v4: Return defined error code and applying coding style for function calls
v5: Fixing wrong patch applied before with typo on dev_err and applying coding
style as suggested on v3

drivers/staging/octeon-usb/octeon-hcd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index c9fbff93bed4..dd73fd48e12e 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -2587,10 +2587,10 @@ static void cvmx_usb_transfer_isoc(struct octeon_hcd *usb,
}
} else {
pipe->next_tx_frame += pipe->interval;
-
cvmx_usb_complete(usb, pipe, transaction, CVMX_USB_STATUS_OK);
}
}
+
/**
* Handles channels halt in non DMA mode
* @hcchar_chena:
@@ -2629,7 +2629,7 @@ static int cvmx_usb_dma_halt(u32 hcchar_chena, u32 hcint_xfercompl,
* Channel halt isn't needed.
*/
} else {
- dev_ err(dev, "USB%d: Channel %d interrupt without halt\n",
+ dev_err(dev, "USB%d: Channel %d interrupt without halt\n",
usb->index, channel);
return -EINVAL;
}
--
2.16.4