Re: [PATCH v2 0/6] ALSA: Return -ENODEV instead of -EFAULT on module-get failure
From: Takashi Iwai
Date: Wed Jul 08 2026 - 06:46:14 EST
On Tue, 07 Jul 2026 10:45:00 +0200,
phucduc.bui@xxxxxxxxx wrote:
>
> From: bui duc phuc <phucduc.bui@xxxxxxxxx>
>
> Hi all,
>
> Several ALSA open/allocate paths call try_module_get() on the owning card
> module and return -EFAULT when it fails. However, try_module_get() fails
> when the module is no longer live (i.e. it is going away), meaning the
> device is no longer usable.
> This series updates only those paths, making the error code consistent
> with the existing "device unavailable" checks in the same functions.
> Other -EFAULT returns are left unchanged.
>
> Link v1:
> https://lore.kernel.org/all/20260706084950.49331-1-phucduc.bui@xxxxxxxxx/
>
> Changes in v2:
> - Update the commit message.
> - Remove unrelated changes from the "ALSA: control: Return -ENODEV
> instead of -EFAULT in snd_ctl_open()" patch.
>
> Best regards,
> Phuc
>
> bui duc phuc (6):
> ALSA: control: Return -ENODEV instead of -EFAULT in snd_ctl_open()
> ALSA: hwdep: Return -ENODEV instead of -EFAULT in snd_hwdep_open()
> ALSA: info: Return -ENODEV instead of -EFAULT in alloc_info_private()
> ALSA: mixer: oss: Return -ENODEV instead of -EFAULT in
> snd_mixer_oss_open()
> ALSA: pcm: oss: Return -ENODEV instead of -EFAULT in
> snd_pcm_oss_open()
> ALSA: pcm: Return -ENODEV instead of -EFAULT in snd_pcm_open()
Applied to for-next branch now. Thanks.
Takashi