[PATCH v12 2/2] i2c: aspeed: support ast2600 i2c new register mode driver
Andy Shevchenko
andriy.shevchenko at linux.intel.com
Fri Jul 14 18:56:12 AEST 2023
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
More information about the Linux-aspeed
mailing list