Re: [PATCH] ALSA: usb-audio: scarlett2: unwind notify URB init failures
From: Takashi Iwai
Date: Tue Jun 30 2026 - 08:23:56 EST
On Mon, 29 Jun 2026 18:02:32 +0200,
Yousef Alhouseen wrote:
>
> scarlett2_init_notify() stores the newly allocated URB in mixer->urb
> before allocating the transfer buffer and submitting the URB. If a later
> step fails, the function returns an error while leaving a partially
> initialized notification URB attached to the mixer.
>
> Clean up the URB and transfer buffer locally on those failure paths.
> Leave mixer->urb NULL so later cleanup or retry paths do not see a
> stale notification URB.
Those are released by the common snd_usb_mixer_free() in the error
path of snd_usb_create_mixer(), hence no need to do here.
thanks,
Takashi