fix(usb_host): Fixed unchecked return value in enum driver (coverity)

This commit is contained in:
Roman Leonov
2025-01-29 19:50:35 +08:00
committed by BOT
parent f6997a73ef
commit 26ba099bd1

View File

@ -198,8 +198,8 @@ static uint8_t get_next_free_dev_addr(void)
if (usbh_devs_open(new_dev_addr, &dev_hdl) == ESP_ERR_NOT_FOUND) { if (usbh_devs_open(new_dev_addr, &dev_hdl) == ESP_ERR_NOT_FOUND) {
break; break;
} }
// We have a device with the same address on a bus, close device and request new addr // We have a device with the same address on a bus, close device and request new addr, there should be no error with closing
usbh_dev_close(dev_hdl); ESP_ERROR_CHECK(usbh_dev_close(dev_hdl));
new_dev_addr = get_next_dev_addr(); new_dev_addr = get_next_dev_addr();
} }
// Sanity check // Sanity check