Skip to content

Commit 2255cdc

Browse files
committed
fix(usb_host): Fixed unchecked return value in enum driver (coverity)
1 parent 64a7472 commit 2255cdc

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)