]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ALSA: caiaq: Don't abort when no input device is available
authorTakashi Iwai <tiwai@suse.de>
Mon, 27 Apr 2026 14:56:15 +0000 (16:56 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 28 Apr 2026 06:13:33 +0000 (08:13 +0200)
The previous fix to handle the error from setup_card() caused a
regression for the models that have no dedicated input device;
snd_usb_caiaq_input_init() just returns -EINVAL, and we treat it as a
fatal error although it should be ignored.

As a regression fix, change the error code to -ENODEV, and ignore this
error in the callee, to continue probing.

Fixes: 28abd224db4a ("ALSA: caiaq: Handle probe errors properly")
Cc: <stable@vger.kernel.org>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=221423
Link: https://patch.msgid.link/20260427145642.6637-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/caiaq/device.c
sound/usb/caiaq/input.c

index 1afd91e2739659f8c7e5f2aa42eba2d158a5ebca..b20aae0caf60a4be06a5109d243d030a5c248290 100644 (file)
@@ -366,7 +366,7 @@ static int setup_card(struct snd_usb_caiaqdev *cdev)
 
 #ifdef CONFIG_SND_USB_CAIAQ_INPUT
        ret = snd_usb_caiaq_input_init(cdev);
-       if (ret < 0) {
+       if (ret < 0 && ret != -ENODEV) {
                dev_err(dev, "Unable to set up input system (ret=%d)\n", ret);
                return ret;
        }
index a9130891bb696dbd0ba2d43b93b469db9b78352e..5c70fdf61cc139a0584f61f06e12950cbeb491a1 100644 (file)
@@ -804,7 +804,7 @@ int snd_usb_caiaq_input_init(struct snd_usb_caiaqdev *cdev)
 
        default:
                /* no input methods supported on this device */
-               ret = -EINVAL;
+               ret = -ENODEV;
                goto exit_free_idev;
        }