From mboxrd@z Thu Jan 1 00:00:00 1970 From: Baruch Siach Subject: Re: [PATCH -next] i2c: digicolor: use clk_disable_unprepare instead of clk_unprepare Date: Sun, 30 Oct 2016 06:45:39 +0200 Message-ID: <20161030044539.whnwlup6aetqbe6p@tarshish> References: <1477758677-7831-1-git-send-email-weiyj.lk@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from guitar.tcltek.co.il ([192.115.133.116]:53074 "EHLO mx.tkos.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790AbcJ3Epr (ORCPT ); Sun, 30 Oct 2016 00:45:47 -0400 Content-Disposition: inline In-Reply-To: <1477758677-7831-1-git-send-email-weiyj.lk@gmail.com> Sender: linux-i2c-owner@vger.kernel.org List-Id: linux-i2c@vger.kernel.org To: Wei Yongjun Cc: Wolfram Sang , Wei Yongjun , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org Hi Wei Yongjun, On Sat, Oct 29, 2016 at 04:31:17PM +0000, Wei Yongjun wrote: > From: Wei Yongjun > > since clk_prepare_enable() is used to get i2c->clk, we should > use clk_disable_unprepare() to release it for the error path. > > Signed-off-by: Wei Yongjun Acked-by: Baruch Siach Thanks, baruch > drivers/i2c/busses/i2c-digicolor.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/i2c/busses/i2c-digicolor.c b/drivers/i2c/busses/i2c-digicolor.c > index 49f2084..50813a2 100644 > --- a/drivers/i2c/busses/i2c-digicolor.c > +++ b/drivers/i2c/busses/i2c-digicolor.c > @@ -347,7 +347,7 @@ static int dc_i2c_probe(struct platform_device *pdev) > > ret = i2c_add_adapter(&i2c->adap); > if (ret < 0) { > - clk_unprepare(i2c->clk); > + clk_disable_unprepare(i2c->clk); > return ret; > } -- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -