]> git.baikalelectronics.ru Git - kernel.git/commit
thermal/drivers/qcom: Fix error code in adc_tm5_get_dt_channel_data()
authorYang Yingliang <yangyingliang@huawei.com>
Thu, 27 May 2021 09:26:40 +0000 (17:26 +0800)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 27 May 2021 09:38:34 +0000 (11:38 +0200)
commit850c837856fc9a80ca83f3f76cdabef29ec15110
treeb5b3677c1516beb324f770c480f0b438bb6cffb0
parent1efbb2e5e33bb98b8f452cb0fb5d4967c47054f5
thermal/drivers/qcom: Fix error code in adc_tm5_get_dt_channel_data()

Return -EINVAL when args is invalid instead of 'ret' which is set to
zero by a previous successful call to a function.

Fixes: f44b96168ee8 ("thermal: qcom: add support for adc-tm5 PMIC thermal monitor")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210527092640.2070555-1-yangyingliang@huawei.com
drivers/thermal/qcom/qcom-spmi-adc-tm5.c