On Wed, Mar 06, 2024 at 01:51:09PM +0100, Linus Walleij wrote: > On Wed, Mar 6, 2024 at 12:20 PM Andy Shevchenko > <andy.shevchenko@xxxxxxxxx> wrote: ... > Fixed them both when applying! Thanks! There is still an issue with error path. The problem is that the populate is called too early and even though the failure of let's say gpiochip_add_data() (as it seems the only one that really needed the restoration) will NOT reverse the all allocated gpio_pdev/gpio_dev related resources. Hence what I see is 1) move populate as down as possible in probe(); 2) create unpopulate counterpart; 3) call it in probe(). -- With Best Regards, Andy Shevchenko