Re: [PATCH v12 2/2] i2c: aspeed: support ast2600 i2c new register mode driver

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

 



On Fri, Jul 14, 2023 at 08:08:48AM +0000, Ryan Chen wrote:
> On 14/07/2023 09:45, Ryan Chen wrote:

...

> > +	ret = devm_i2c_add_adapter(dev, &i2c_bus->adap);
> > +	if (ret)
> > +		return ret;

...

> > +	i2c_del_adapter(&i2c_bus->adap);
> 
> > I have doubts that you tested this. I think you have here double free/del of the adapter.
> Sorry, i can't catch your point for double free the adapter.
> It should use i2c_del_adapter in driver remove function.
> All the driver doing this 
> https://github.com/torvalds/linux/blob/master/drivers/i2c/busses/i2c-npcm7xx.c#L2373
> https://github.com/torvalds/linux/blob/master/drivers/i2c/busses/i2c-altera.c#L473
> 
> Do you mean it is not necessary? 

I'm wondering if you understand what you are doing...

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux