Skip to content

Commit 6ac45b2

Browse files
committed
Merge branch 'fix/usb_host_enum_unchecked_return_coverity' into 'master'
fix(usb_host): Fixed unchecked return value in enum driver (coverity) Closes IDF-10068 See merge request espressif/esp-idf!36663
2 parents 57b2ef8 + 2255cdc commit 6ac45b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/usb/enum.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ static uint8_t get_next_free_dev_addr(void)
198198
if (usbh_devs_open(new_dev_addr, &dev_hdl) == ESP_ERR_NOT_FOUND) {
199199
break;
200200
}
201-
// We have a device with the same address on a bus, close device and request new addr
202-
usbh_dev_close(dev_hdl);
201+
// We have a device with the same address on a bus, close device and request new addr, there should be no error with closing
202+
ESP_ERROR_CHECK(usbh_dev_close(dev_hdl));
203203
new_dev_addr = get_next_dev_addr();
204204
}
205205
// Sanity check

0 commit comments

Comments
 (0)