mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:17:13 +08:00
sim/usbhost: modify ctrlin return value
On success, zero (OK) is returned. On a failure, a negated errno value is returned indicating the nature of the failure. Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
This commit is contained in:
@@ -569,7 +569,7 @@ static int sim_usbhost_ctrlin(struct usbhost_driver_s *drvr,
|
|||||||
nxsem_wait(&ep0info->iocsem);
|
nxsem_wait(&ep0info->iocsem);
|
||||||
nxsem_destroy(&ep0info->iocsem);
|
nxsem_destroy(&ep0info->iocsem);
|
||||||
|
|
||||||
return ep0info->xfrd;
|
return ep0info->xfrd < 0 ? ep0info->xfrd : OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user