diff options
| author | sakumisu <[email protected]> | 2024-04-25 21:20:24 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2024-04-25 21:20:24 +0800 |
| commit | 7ee77b42ee9171f4eba587b128a28e52b581b904 (patch) | |
| tree | 92bbbd3ff558c4cefe9909c59124e03a23066617 | |
| parent | 404225ade43c4312be33d00ef00f1dba158ae856 (diff) | |
check class_driver is null
| -rw-r--r-- | core/usbh_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/usbh_core.c b/core/usbh_core.c index 33b3c709..d451a572 100644 --- a/core/usbh_core.c +++ b/core/usbh_core.c @@ -815,7 +815,7 @@ int lsusb(int argc, char **argv) hport = &hub->child[port]; if (hport->connected) { for (uint8_t i = 0; i < hport->config.config_desc.bNumInterfaces; i++) { - if (hport->config.intf[i].class_driver->driver_name) { + if (hport->config.intf[i].class_driver && hport->config.intf[i].class_driver->driver_name) { USB_LOG_RAW("\t|__Port %u, dev addr:0x%02x, If %u, ClassDriver=%s\r\n", hport->port, hport->dev_addr, |
