From: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
To: tiwai@suse.de, perex@perex.cz, johannes@sipsolutions.net
Cc: linuxppc-dev@lists.ozlabs.org, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org,
Sreeraj S Kurup <sreekuttan2156239@gmail.com>
Subject: [PATCH] ALSA: aoa: Return ENODEV when no sound card is available
Date: Mon, 30 Nov 2026 12:34:45 +0000 [thread overview]
Message-ID: <20261130123445.3060-1-sreekuttan2156239@gmail.com> (raw)
aoa_snd_device_new() returns -ENOMEM when aoa_get_card()
returns NULL.
This is misleading because the failure indicates that no ALSA
card is available, not that memory allocation failed.
Return -ENODEV instead to report the missing device correctly.
Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
---
sound/aoa/core/alsa.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/aoa/core/alsa.c b/sound/aoa/core/alsa.c
index aad7dfe089c7..bc7e576ab279 100644
--- a/sound/aoa/core/alsa.c
+++ b/sound/aoa/core/alsa.c
@@ -64,7 +64,8 @@ int aoa_snd_device_new(enum snd_device_type type,
struct snd_card *card = aoa_get_card();
int err;
- if (!card) return -ENOMEM;
+ if (!card)
+ return -ENODEV;
err = snd_device_new(card, type, device_data, ops);
if (err) {
--
2.55.0
reply other threads:[~2026-11-30 12:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261130123445.3060-1-sreekuttan2156239@gmail.com \
--to=sreekuttan2156239@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®