修改异常UT用例,重复关闭fd

Signed-off-by: li-tiangang4 <litiangang4@huawei.com>
This commit is contained in:
li-tiangang4
2025-01-13 16:56:12 +08:00
parent 46f2be76dc
commit cbe3635479
+1 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2024 Huawei Device Co., Ltd.
* Copyright (c) 2021-2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -567,7 +567,6 @@ int32_t InputHub::OpenInputDeviceLocked(const std::string &devicePath)
RecordDeviceLog(devicePath, device->identifier);
std::string descriptor = device->identifier.descriptor;
if (MakeDevice(fd, std::move(device)) < 0) {
CloseFd(fd);
if (IsNeedPrintLog(descriptor)) {
DHLOGI("Opening device error: %{public}s", devicePath.c_str());
}