mirror of
https://github.com/openharmony/drivers_framework.git
synced 2026-07-25 14:25:20 -04:00
fix: nullptr reference in devhost
Signed-off-by: yuanbo <yuanbo@huawei.com>
This commit is contained in:
@@ -74,8 +74,7 @@ int DevHostServiceAddDevice(struct IDevHostService *inst, const struct HdfDevice
|
||||
|
||||
device = DevHostServiceQueryOrAddDevice(hostService, DEVICEID(deviceInfo->deviceId));
|
||||
if (device == NULL || device->super.Attach == NULL) {
|
||||
ret = HDF_DEV_ERR_NO_DEVICE;
|
||||
goto error;
|
||||
return HDF_DEV_ERR_NO_DEVICE;
|
||||
}
|
||||
devNode = device->super.GetDeviceNode(&device->super, deviceInfo->deviceId);
|
||||
if (devNode != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user