thermal/drivers/tsens: Fix wrong check for tzd in irq handlers
authorAnsuel Smith <ansuelsmth@gmail.com>
Tue, 7 Sep 2021 21:25:42 +0000 (23:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Oct 2021 12:40:57 +0000 (14:40 +0200)
commit2e28f7dd3743bf8f386fa72b96e5da2898039df5
tree77d34fbca4fb82defbcc910992074fb1b0522daa
parent7a670cfb0f4cba692a2cc0caa60810986ceeab3d
thermal/drivers/tsens: Fix wrong check for tzd in irq handlers

[ Upstream commit cf96921876dcee4d6ac07b9de470368a075ba9ad ]

Some devices can have some thermal sensors disabled from the
factory. The current two irq handler functions check all the sensor by
default and the check if the sensor was actually registered is
wrong. The tzd is actually never set if the registration fails hence
the IS_ERR check is wrong.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210907212543.20220-1-ansuelsmth@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/qcom/tsens.c