* [PATCH] ALSA: aoa: Return ENODEV when no sound card is available
@ 2026-11-30 12:34 Sreeraj S Kurup
2026-12-01 7:47 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Sreeraj S Kurup @ 2026-11-30 12:34 UTC (permalink / raw)
To: tiwai, perex, johannes
Cc: linuxppc-dev, linux-sound, linux-kernel, Sreeraj S Kurup
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ALSA: aoa: Return ENODEV when no sound card is available
2026-11-30 12:34 [PATCH] ALSA: aoa: Return ENODEV when no sound card is available Sreeraj S Kurup
@ 2026-12-01 7:47 ` Takashi Iwai
2026-12-01 12:45 ` Sreeraj S Kurup
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2026-12-01 7:47 UTC (permalink / raw)
To: Sreeraj S Kurup
Cc: tiwai, perex, johannes, linuxppc-dev, linux-sound, linux-kernel
On Mon, 30 Nov 2026 13:34:45 +0100,
Sreeraj S Kurup wrote:
>
> 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>
Applied to for-next branch. Thanks.
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-12-01 12:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 12:34 [PATCH] ALSA: aoa: Return ENODEV when no sound card is available Sreeraj S Kurup
2026-12-01 7:47 ` Takashi Iwai
2026-12-01 12:45 ` Sreeraj S Kurup
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®