diff --git a/common/include/input_hub.cpp b/common/include/input_hub.cpp index 6dd34c2fd19ed89c5191f16e5912ddf7fc203dae..4628c0c03ced21771ef1546594fb1f59ba9ec907 100644 --- a/common/include/input_hub.cpp +++ b/common/include/input_hub.cpp @@ -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()); }