Fix a warning detected by tools/tesbuild.sh. function was not returning the correct value in the case of errors

This commit is contained in:
Gregory Nutt 2015-07-22 15:46:43 -06:00
parent ff75f68eeb
commit bb30fa039f
2 changed files with 6 additions and 4 deletions

2
arch

@ -1 +1 @@
Subproject commit 0321c31ebbf4e8f03f84652f6d168272e5b003bf Subproject commit a5d400650765ca63bccd82101f5b60d4f9631015

View File

@ -1053,7 +1053,7 @@ static int usbhost_mouse_poll(int argc, char *argv[])
#endif #endif
unsigned int nerrors = 0; unsigned int nerrors = 0;
ssize_t nbytes; ssize_t nbytes;
int ret; int ret = OK;
uvdbg("Started\n"); uvdbg("Started\n");
@ -1100,7 +1100,9 @@ static int usbhost_mouse_poll(int argc, char *argv[])
* long time). * long time).
*/ */
udbg("ERROR: DRVR_TRANSFER returned: %d/%d\n", ret, nerrors); udbg("ERROR: DRVR_TRANSFER returned: %d/%u\n",
(int)nbytes, nerrors);
if (nbytes != -EAGAIN) if (nbytes != -EAGAIN)
{ {
if (++nerrors > 200) if (++nerrors > 200)
@ -1268,7 +1270,7 @@ static int usbhost_mouse_poll(int argc, char *argv[])
} }
irqrestore(flags); irqrestore(flags);
return 0; return ret;
} }
/**************************************************************************** /****************************************************************************