diff options
author | Colin Ian King <colin.king@canonical.com> | 2021-02-16 15:16:26 +0000 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2021-02-16 19:05:23 +0100 |
commit | 74369d041a0a3e9e57de50efd4bd4bc10564e254 (patch) | |
tree | 7d11ff927673685544b2d1a9bfcc21f2b04cb55a /block/blk-pm.h | |
parent | ca66dca5eda6bd16b7b27fed2a034f2396df5627 (diff) |
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: ca66dca5eda6 ("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
Diffstat (limited to 'block/blk-pm.h')
0 files changed, 0 insertions, 0 deletions