Fix fan sensor creation logic
This commit fixes an incorrect comparison on I2CFan type fan
address in sensor creation logic.
Tested: # ipmitool sensor
Fan sensors were created as expected.
Change-Id: Ifacce16fffa2058bc8ab38f7ab66fbed7bcb4f72
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
diff --git a/src/FanMain.cpp b/src/FanMain.cpp
index c250d0a..866fe4f 100644
--- a/src/FanMain.cpp
+++ b/src/FanMain.cpp
@@ -181,7 +181,7 @@
unsigned int configAddress = std::visit(
VariantToUnsignedIntVisitor(), findAddress->second);
- if (configBus == bus && configAddress == configAddress)
+ if (configBus == bus && configAddress == address)
{
sensorData = &(sensor.second);
break;