Closed yizhao1 closed 5 years ago
In COPY_TH the SensorThresholds->TH will be copied to tmp.TH only if TH.IsSupported == SAHPI_TRUE. So we should pass &tmp but not SensorThresholds as the argument to OH_CALL_ABI. Otherwise the TH will be set even if TH.IsSupported == SAHPI_FALSE.
Signed-off-by: yanjun.zhu yanjun.zhu@windriver.com Signed-off-by: Yi Zhao yi.zhao@windriver.com
Fixes #2745 saHpiSensorThresholdsSet may set Thresholds even if not supported
In COPY_TH the SensorThresholds->TH will be copied to tmp.TH only if TH.IsSupported == SAHPI_TRUE. So we should pass &tmp but not SensorThresholds as the argument to OH_CALL_ABI. Otherwise the TH will be set even if TH.IsSupported == SAHPI_FALSE.
Signed-off-by: yanjun.zhu yanjun.zhu@windriver.com Signed-off-by: Yi Zhao yi.zhao@windriver.com