diff --git a/fboss/platform/fan_service/Utils.cpp b/fboss/platform/fan_service/Utils.cpp index 2bc1888f92e56..932b8c44ff9ec 100644 --- a/fboss/platform/fan_service/Utils.cpp +++ b/fboss/platform/fan_service/Utils.cpp @@ -90,7 +90,7 @@ bool Utils::isValidConfig(const FanServiceConfig& config) { XLOG(ERR) << "ledSysfsPath cannot be empty"; return false; } - if ((!fan.presenceSysfsPath()) != (!fan.presenceGpio())) { + if ((!fan.presenceSysfsPath()) && (!fan.presenceGpio())) { XLOG(ERR) << "either presenceSysfsPath or presenceGpio must be set"; return false; }