OpenCloudOS-Kernel/drivers/thermal/qcom
Colin Ian King 74369d041a thermal: qcom: Fix comparison with uninitialized variable channels_available
Currently the check of chip->channels[i].channel is against an the
uninitialized variable channels_available.  I believe the variable
channels_available needs to be fetched first by the call to adc_tm5_read
before the channels check. Fix the issue swapping the order of the
channels check loop with the call to adc_tm5_read.

Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: ca66dca5ed ("thermal: qcom: add support for adc-tm5 PMIC thermal monitor")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210216151626.162996-1-colin.king@canonical.com
2021-02-16 19:05:23 +01:00
..
Kconfig thermal: qcom: add support for adc-tm5 PMIC thermal monitor 2021-02-15 21:28:53 +01:00
Makefile thermal: qcom: add support for adc-tm5 PMIC thermal monitor 2021-02-15 21:28:53 +01:00
qcom-spmi-adc-tm5.c thermal: qcom: Fix comparison with uninitialized variable channels_available 2021-02-16 19:05:23 +01:00
qcom-spmi-temp-alarm.c thermal: qcom-spmi-temp-alarm: Don't suppress negative temp 2020-09-04 11:52:54 +02:00
tsens-8960.c drivers: thermal: tsens: Pass around struct tsens_sensor as a constant 2020-03-20 12:17:48 +01:00
tsens-v0_1.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
tsens-v1.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
tsens-v2.c drivers: thermal: tsens: Add watchdog support 2020-03-20 12:17:48 +01:00
tsens.c - Add support to enable/disable the thermal zones resulting on core code and 2020-08-06 18:10:55 -07:00
tsens.h thermal: qcom: tsens-v0_1: Add support for MSM8939 2020-07-27 10:33:41 +02:00