RE: [Patch v1] i2c: imx7ulp: add i.MX7ULP i2c controller bus driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Vladimir Zapolskiy <mailto:vladimir_zapolskiy@xxxxxxxxxx> Sent: Tuesday, March 15, 2016 8:42 PM
> To: Pan Gao <pandy.gao@xxxxxxx>; wsa@xxxxxxxxxxxxx; u.kleine-
> koenig@xxxxxxxxxxxxxx
> Cc: linux-i2c@xxxxxxxxxxxxxxx; Frank Li <frank.li@xxxxxxx>; Fugang Duan
> <fugang.duan@xxxxxxx>
> Subject: Re: [Patch v1] i2c: imx7ulp: add i.MX7ULP i2c controller bus driver
> 
> Hello,
> 
> On 15.03.2016 11:51, Gao Pan wrote:
> > Add i.MX7ULP i2c bus driver which can continue operating in stop modes
> > provided an appropriate clock is available.
> >
> > It is also designed for low CPU overhead with DMA offloading of FIFO
> > register accesses.
> >
> > Signed-off-by: Gao Pan <pandy.gao@xxxxxxx>
> > ---
> 
> [snip]
> 
> > +
> > +static int i2c_imx7ulp_start(struct imx7ulp_i2c_struct *i2c_imx7ulp)
> > +{
> > +	int ret;
> > +	unsigned int temp;
> > +
> > +	dev_dbg(&i2c_imx7ulp->adapter.dev, "<%s>\n", __func__);
> > +
> > +	ret = clk_prepare_enable(i2c_imx7ulp->bus_clk);
> > +	if (ret) {
> > +		dev_err(&i2c_imx7ulp->adapter.dev,
> > +			"can't enable I2C bus clock, ret=%d\n", ret);
> > +		return ret;
> > +	}
> > +
> > +	ret = clk_prepare_enable(i2c_imx7ulp->per_clk);
> > +	if (ret) {
> > +		dev_err(&i2c_imx7ulp->adapter.dev,
> > +			"can't enable I2C peripheral clock, ret=%d\n", ret);
> > +		return ret;
> 
> Leaked prepared/enabled i2c_imx7ulp->bus_clk clock on error path.
 
Yes, you are right. Thanks! 

Best Regards
Gao Pan
��.n��������+%������w��{.n�����{��-��)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux