From 44f09c470b0fe8095270cf402c93198a7745ba36 Mon Sep 17 00:00:00 2001 From: Roman Leonov Date: Wed, 29 Jan 2025 19:50:17 +0800 Subject: [PATCH] fix(usb_host): Fixed unchecked return value in enum driver (coverity) --- components/usb/enum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/usb/enum.c b/components/usb/enum.c index 2024c09ee5..fc93a38f72 100644 --- a/components/usb/enum.c +++ b/components/usb/enum.c @@ -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) { break; } - // We have a device with the same address on a bus, close device and request new addr - usbh_dev_close(dev_hdl); + // We have a device with the same address on a bus, close device and request new addr, there should be no error with closing + ESP_ERROR_CHECK(usbh_dev_close(dev_hdl)); new_dev_addr = get_next_dev_addr(); } // Sanity check