Re: [PATCH v2 04/10] soundwire: stream: Clean up allocated runtime resources on config failure

From: Charles Keepax

Date: Fri Nov 13 2026 - 14:15:16 EST


On Tue, Nov 03, 2026 at 09:53:48AM +0000, Lee Jones wrote:
> In sdw_stream_add_master() and sdw_stream_add_slave(), failures during
> runtime or port configuration jump directly to the unlock label,
> bypassing alloc_error and leaving newly allocated master/slave runtime
> and port structures attached to the stream and bus lists.
>
> Track whether ports were newly allocated in the current invocation and
> route configuration failures through alloc_error so all resources
> allocated by the failing call are released.
>
> Closes: https://sashiko.dev/#/bug/linux-546e137d-6e4d-4f22-99c3-8ccc8beb5350
> Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
> ---

Reviewed-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>

Thanks,
Charles