lkml.org 
[lkml]   [2013]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.11 199/272] i2c: wmt: add missing clk_disable_unprepare() on error
    Date
    3.11.10.1 -stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

    commit 2dc9688a106886db7191d30f30ffd61fde827efd upstream.

    Add the missing clk_disable_unprepare() before return
    from wmt_i2c_reset_hardware() in the error handling case.

    Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
    Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
    Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
    ---
    drivers/i2c/busses/i2c-wmt.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/drivers/i2c/busses/i2c-wmt.c b/drivers/i2c/busses/i2c-wmt.c
    index baaa7d1..b04d37a 100644
    --- a/drivers/i2c/busses/i2c-wmt.c
    +++ b/drivers/i2c/busses/i2c-wmt.c
    @@ -350,6 +350,7 @@ static int wmt_i2c_reset_hardware(struct wmt_i2c_dev *i2c_dev)
    err = clk_set_rate(i2c_dev->clk, 20000000);
    if (err) {
    dev_err(i2c_dev->dev, "failed to set clock = 20Mhz\n");
    + clk_disable_unprepare(i2c_dev->clk);
    return err;
    }

    --
    1.8.3.2


    \
     
     \ /
      Last update: 2013-12-06 15:01    [W:4.026 / U:1.128 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site