lkml.org 
[lkml]   [2016]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RESEND PATCH 1/8] thermal: rockchip: disable thermal->clk in err case
    Date
    From: Shawn Lin <shawn.lin@rock-chips.com>

    Disable thermal->clk when enabling pclk fails in
    resume routine.

    Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
    Reviewed-by: Heiko Stuebner <heiko@sntech.de>
    Reviewed-by: Caesar Wang <wxt@rock-chips.com>
    Signed-off-by: Caesar Wang <wxt@rock-chips.com>
    ---

    drivers/thermal/rockchip_thermal.c | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
    index 1dbd862..f4c4bcd 100644
    --- a/drivers/thermal/rockchip_thermal.c
    +++ b/drivers/thermal/rockchip_thermal.c
    @@ -979,8 +979,10 @@ static int __maybe_unused rockchip_thermal_resume(struct device *dev)
    return error;

    error = clk_enable(thermal->pclk);
    - if (error)
    + if (error) {
    + clk_disable(thermal->clk);
    return error;
    + }

    rockchip_thermal_reset_controller(thermal->reset);

    --
    1.9.1
    \
     
     \ /
      Last update: 2016-04-22 12:21    [W:2.530 / U:0.248 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site