On Tue, Nov 03, 2026 at 08:29:05AM +0000, Wentao Liang wrote: > Each master activation calls devm_pinctrl_get() against the parent I2C > controller device. Switching or removing the demux only releases the > adapter reference, so the pinctrl reference and its devres entry persist > until the parent controller is removed. Repeated switches accumulate > these entries. Activation failures after obtaining the handle retain it > too. > > Use pinctrl_get() and keep the handle with the active channel. Release > it when activation fails or the channel is deactivated, before dropping > the parent adapter reference and reverting the device-tree changeset. > Keep the no-pinctrl case working by storing NULL when get returns > -ENODEV. > > Fixes: 50a5ba876908 ("i2c: mux: demux-pinctrl: add driver") > Cc: stable@vger.kernel.org > Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex > Signed-off-by: Wentao Liang To get a better picture, how did you test this?