Re: [PATCH] mux: core: fix reference count leak in mux_chip_register()

From: Salah Triki

Date: Wed Feb 04 2026 - 15:54:41 EST


On Sat, Jan 31, 2026 at 11:03:55PM +0100, Peter Rosin wrote:
> Hi!
>
>
> This patch is broken. NACK.
>
> The put_device() call that you seem to think is missing is found in the
> mux_chip_free() function, which is what should be called to clean up
> after (a successful) mux_chip_alloc().
>
> If there really is a leak somewhere, the real problem is a missing call
> to mux_chip_free(), not a missing put_device() in mux_chip_register().
> Adding a put_device() in mux_chip_register() leads to too many calls to
> put_device().
>
> Cheers,
> Peter

Thanks for the clarification, that makes sense. I'll drop this patch.

Best regards,
Salah