Re: [PATCH] mfd: sm501: unwind common init failures

From: Pengpeng Hou

Date: Wed Dec 02 2026 - 22:28:09 EST


Hi Lee and Ben,

I wouldn't use the proposed common unwind unchanged.
sm501_register_gpio_i2c_instance() associates the lookup table with
the child and registers it with gpiolib. Unregistering the child and
removing the lookup from gpiolib are separate operations; v1 didn't
establish their ordering. The point at which the child's device is
initialized matters for using devres there too.

Ben, was the lookup table intended to live for the parent device or
for the individual i2c-gpio child? I'd settle that before reusing
the remove path on partial probe failure.

Thanks,
Pengpeng