Skip to content

Commit

Permalink
thermal: ti-soc-thermal: Fix reversed condition in ti_thermal_expose_…
Browse files Browse the repository at this point in the history
…sensor()

This condition is reversed and will cause breakage.

Fixes: 7440f51 ("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
  • Loading branch information
Dan Carpenter authored and Daniel Lezcano committed Jul 21, 2020
1 parent 8bcd017 commit 0f348db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/thermal/ti-soc-thermal/ti-thermal-common.c
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 0f348db

Please sign in to comment.