]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ALSA: usb-audio: Simplify NULL comparison in mixer_quirks
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Mon, 26 May 2025 14:07:46 +0000 (17:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Oct 2025 11:44:05 +0000 (13:44 +0200)
[ Upstream commit f2d6d660e8fd5f4467e80743f82119201e67fa9c ]

Handle report from checkpatch.pl:

  CHECK: Comparison to NULL could be written "t->name"

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250526-dualsense-alsa-jack-v1-7-1a821463b632@collabora.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/usb/mixer_quirks.c

index 1eae6e83d02597725eb2a25f6673e8831d35ec4b..3bd2daba8ecac932b0ed13e88ec0d1bb1e0f9f45 100644 (file)
@@ -128,7 +128,7 @@ static int snd_create_std_mono_table(struct usb_mixer_interface *mixer,
 {
        int err;
 
-       while (t->name != NULL) {
+       while (t->name) {
                err = snd_create_std_mono_ctl(mixer, t->unitid, t->control,
                                              t->cmask, t->val_type, t->name,
                                              t->tlv_callback);