thermal/drivers/qcom/lmh: Check for SCM availability at probe
authorKonrad Dybcio <konrad.dybcio@linaro.org>
Sat, 9 Mar 2024 13:15:03 +0000 (14:15 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 23 Apr 2024 10:40:29 +0000 (12:40 +0200)
commitd9d3490c48df572edefc0b64655259eefdcbb9be
tree60e3594f697541b7bbc85e3450c41c9a8a1e95aa
parentc0f14ec95262cdcf557016f84b87e45f54e0b881
thermal/drivers/qcom/lmh: Check for SCM availability at probe

Up until now, the necessary scm availability check has not been
performed, leading to possible null pointer dereferences (which did
happen for me on RB1).

Fix that.

Fixes: 53bca371cdf7 ("thermal/drivers/qcom: Add support for LMh driver")
Cc: <stable@vger.kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20240308-topic-rb1_lmh-v2-2-bac3914b0fe3@linaro.org
drivers/thermal/qcom/lmh.c