summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-06-16 12:19:49 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-19 09:14:58 +0300
commit34c4882cf00ff81685698336506fcc39f93e72b2 (patch)
tree61aa4a1201e200e5970e4872c8eeb406e776ab59 /drivers
parentebb23423609067b714e0e05358b0cf4bbd75d239 (diff)
downloadlinux-34c4882cf00ff81685698336506fcc39f93e72b2.tar.xz
thermal: ti-soc-thermal: Fix reversed condition in ti_thermal_expose_sensor()
[ Upstream commit 0f348db01fdf128813fdd659fcc339038fb421a4 ] This condition is reversed and will cause breakage. Fixes: 7440f518dad9 ("thermal/drivers/ti-soc-thermal: Avoid dereferencing ERR_PTR") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20200616091949.GA11940@mwanda Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/thermal/ti-soc-thermal/ti-thermal-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
index 452e034aedc1..343da0031299 100644
--- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
+++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
@@ -183,7 +183,7 @@ int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id,
data = ti_bandgap_get_sensor_data(bgp, id);
- if (!IS_ERR_OR_NULL(data))
+ if (IS_ERR_OR_NULL(data))
data = ti_thermal_build_data(bgp, id);
if (!data)