thermal: ti-soc-thermal: Fix reversed condition in ti_thermal_expose_sensor()

[ Upstream commit 0f348db01f ]

This condition is reversed and will cause breakage.

Fixes: 7440f518da ("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>
This commit is contained in:
Dan Carpenter 2020-06-16 12:19:49 +03:00 committed by Greg Kroah-Hartman
parent c30281c4b2
commit 6482f51199
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,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)