diff --git a/services/native/src/usb_service.cpp b/services/native/src/usb_service.cpp index 834ac4b7ed6d2fd53992b792c28002fdd292e8ef..afabdfe581cbea0ddd15398ddba48fa8bd65fd4f 100644 --- a/services/native/src/usb_service.cpp +++ b/services/native/src/usb_service.cpp @@ -2171,8 +2171,8 @@ int UsbService::Dump(int fd, const std::vector &args) }); if (usbSerialManager_ == nullptr) { - USB_HILOGE(MODULE_USB_SERVICE, "usbSerialManager_ is nullptr"); - return UEC_SERVICE_INVALID_VALUE; + USB_HILOGI(MODULE_USB_SERVICE, "usbSerialManager_ is nullptr"); + usbSerialManager_ = std::make_shared(); } if (argList.empty()) { USB_HILOGE(MODULE_USB_SERVICE, "argList is empty");