lkml.org 
[lkml]   [2020]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.8 261/464] thermal: ti-soc-thermal: Fix reversed condition in ti_thermal_expose_sensor()
    Date
    From: Dan Carpenter <dan.carpenter@oracle.com>

    [ 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>
    ---
    drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
    index 85776db4bf346..2ce4b19f312ac 100644
    --- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
    +++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
    @@ -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)
    --
    2.25.1


    \
     
     \ /
      Last update: 2020-08-17 21:35    [W:5.300 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site