[PATCH v2 2/2] USB-FHCI: Use a signed return type for endpoint_zero_init()

SF Markus Elfring
2015-12-22T15:54:41Z

Date: Tue, 22 Dec 2015 16:24:46 +0100

The return type "u32" was used by the endpoint_zero_init() function
even though it can return a value which corresponds to a negative
error code from a call of the fhci_create_ep() function.
Improve this implementation detail by using the type "int" instead.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/usb/host/fhci-hcd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c
index c6cebb9..b2889f0 100644
--- a/drivers/usb/host/fhci-hcd.c
+++ b/drivers/usb/host/fhci-hcd.c
@@ -64,11 +64,11 @@ u16 fhci_get_sof_timer_count(struct fhci_usb *usb)
}

/* initialize the endpoint zero */
-static u32 endpoint_zero_init(struct fhci_usb *usb,
+static int endpoint_zero_init(struct fhci_usb *usb,
enum fhci_mem_alloc data_mem,
u32 ring_len)
{
- u32 rc;
+ int rc;

rc = fhci_create_ep(usb, data_mem, ring_len);
if (rc)
--
2.6.3