mirror of
https://github.com/apache/nuttx.git
synced 2026-09-23 07:14:28 +08:00
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:
+1
-1
Submodule arch updated: 0321c31ebb...a5d4006507
@@ -1053,7 +1053,7 @@ static int usbhost_mouse_poll(int argc, char *argv[])
|
||||
#endif
|
||||
unsigned int nerrors = 0;
|
||||
ssize_t nbytes;
|
||||
int ret;
|
||||
int ret = OK;
|
||||
|
||||
uvdbg("Started\n");
|
||||
|
||||
@@ -1100,7 +1100,9 @@ static int usbhost_mouse_poll(int argc, char *argv[])
|
||||
* 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 (++nerrors > 200)
|
||||
@@ -1268,7 +1270,7 @@ static int usbhost_mouse_poll(int argc, char *argv[])
|
||||
}
|
||||
|
||||
irqrestore(flags);
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user