On Thu, Dec 05, 2024 at 03:20:51PM +0200, Andy Shevchenko wrote: > On Wed, Dec 04, 2024 at 09:21:52PM +0900, Joe Hattori wrote: > > In gpiochip_setup_dev(), the refcount incremented in device_initialize() > > is not decremented in the error path. Fix it by calling put_device(). > > First of all, we have gpio_put_device(). Should be gpio_device_put(). > Second, what the problem do you have in practice? Can you show any backtrace? > Third, how had this change been tested? > > Looking at the current code I noticed the following: > 1) gpiochip_add_data_with_key() has already that call; > 2) gpiochip_setup_devs() misses that call. > > This effectively means that you inroduce a regression while fixing a bug. > > The GPIO device initialisation is non-trivial, please pay more attention to the > code. > > Bart, can this be removed or reverted before it poisons stable? -- With Best Regards, Andy Shevchenko