diff options
| author | Derek Konigsberg <[email protected]> | 2025-07-18 17:55:47 -0700 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2025-07-19 09:20:49 +0800 |
| commit | 7c38af1b04ce1d09cf4577a0f95acb4f273e49ee (patch) | |
| tree | fb000b5f46013dc58f2c3abd28ea0680c959356e | |
| parent | cc3e91e8d70693b0dc0e954d5c709b15f0e06c6d (diff) | |
Clear error code after intentionally ignoring it
In the case of handling a stall on a max lun request, we need to clear the error code in `ret` after ignoring it. This is necessary so the connect function won't fail.
Fix #339
| -rw-r--r-- | class/msc/usbh_msc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/class/msc/usbh_msc.c b/class/msc/usbh_msc.c index fe91a5bf..12a4f673 100644 --- a/class/msc/usbh_msc.c +++ b/class/msc/usbh_msc.c @@ -284,6 +284,7 @@ static int usbh_msc_connect(struct usbh_hubport *hport, uint8_t intf) if (ret == -USB_ERR_STALL) { USB_LOG_WRN("Device does not support multiple LUNs\r\n"); g_msc_buf[msc_class->sdchar - 'a'][0] = 0; + ret = 0; } else { return ret; } |
