summaryrefslogtreecommitdiff
path: root/components/drivers/usb/usbdevice/class
diff options
context:
space:
mode:
authorzhkag <[email protected]>2023-06-21 10:22:42 +0000
committerGitHub <[email protected]>2023-06-21 18:22:42 +0800
commit33f550cb65c950068ff04c331daeeda3547d2e50 (patch)
treed04ca979398cfaa280cd9f19e400a40943f96bde /components/drivers/usb/usbdevice/class
parentb4e59bac4e2d8b039a2365ddc219ac9a3caf0f77 (diff)
[Kernel] message 可以返回消息的实际大小 (#7709)
Diffstat (limited to 'components/drivers/usb/usbdevice/class')
-rw-r--r--components/drivers/usb/usbdevice/class/hid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/drivers/usb/usbdevice/class/hid.c b/components/drivers/usb/usbdevice/class/hid.c
index d2bb05ed24..59816df4a9 100644
--- a/components/drivers/usb/usbdevice/class/hid.c
+++ b/components/drivers/usb/usbdevice/class/hid.c
@@ -627,7 +627,7 @@ static void hid_thread_entry(void* parameter)
hiddev = (struct hid_s *)parameter;
while(1)
{
- if(rt_mq_recv(&hiddev->hid_mq, &report, sizeof(report),RT_WAITING_FOREVER) != RT_EOK )
+ if(rt_mq_recv(&hiddev->hid_mq, &report, sizeof(report),RT_WAITING_FOREVER) < 0)
continue;
HID_Report_Received(&report);
}