]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: usx2y: Relax __free() variable declarations
authorTakashi Iwai <tiwai@suse.de>
Tue, 16 Dec 2025 14:06:32 +0000 (15:06 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 17 Dec 2025 09:08:30 +0000 (10:08 +0100)
commit43cc944c8e28d26f152198278f81cf7f9955ff85
tree3b1f8060a9c086c27ed0976abc512695bac87516
parent04c654624f41d3c3eee48e9837a52d8a2bbc7332
ALSA: usx2y: Relax __free() variable declarations

We used to have a variable declaration with __free() initialized with
NULL.  This was to keep the old coding style rule, but recently it's
relaxed and rather recommends to follow the new rule to declare in
place of use for __free() -- which avoids potential deadlocks or UAFs
with nested cleanups.

Although the current code has no bug, per se, let's follow the new
standard and move the declaration to the place of assignment (or
directly assign the allocated result) instead of NULL initializations.

Fixes: 67afec157fe6 ("ALSA: usb-audio: us144mkii: Add MIDI support and mixer controlsj")
Fixes: a2a2210f2c2e ("ALSA: usb-audio: us144mkii: Implement audio playback and feedback")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251216140634.171890-11-tiwai@suse.de
sound/usb/usx2y/us144mkii.c
sound/usb/usx2y/us144mkii_controls.c
sound/usb/usx2y/us144mkii_pcm.c