summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan Conrad <[email protected]>2019-09-21 19:29:57 -0400
committerNathan Conrad <[email protected]>2019-09-21 19:29:57 -0400
commit9498adef71fe2816d336061b38ed801dc980a8bb (patch)
treee37eaba8bba7864d9751b5edfd9a7316f71132f2 /src
parentfbb8520acdb7137ef695c03b05e1a3d6c4d33ba2 (diff)
Changing the bitwise to a logical OR created a huge hard to find bug. It shortcutted the call to the class function,
so, lets use shortcutting anyway?
Diffstat (limited to 'src')
-rw-r--r--src/device/usbd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c
index fb28ff0e6..50964bdee 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -549,9 +549,10 @@ static bool process_control_request(uint8_t rhport, tusb_control_request_t const
// must not call tud_control_status(), and return value will have no effect
// class driver is invoked last, so that EP already has EP stall cleared (in event of clear feature EP halt)
- if ( usbd_class_drivers[drv_id].control_request )
+ if ( usbd_class_drivers[drv_id].control_request &&
+ usbd_class_drivers[drv_id].control_request(rhport, p_request))
{
- ret = ret || usbd_class_drivers[drv_id].control_request(rhport, p_request);
+ ret = true;
}
return ret;
}