mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
ALSA: core: propagate actual error code from register_chrdev
The alsa_sound_init() function currently returns a hardcoded -EIO if register_chrdev() fails, masking specific error codes from __register_chrdev() such as -EINVAL, -ENOMEM, or -EBUSY. Masking these failures under a generic -EIO makes system-level diagnostics unnecessarily difficult. Propagating explicit error codes from register_chrdev() is also an established convention widely practiced across other subsystems. Fix this by capturing and propagating the dynamic error code from register_chrdev(). While at it, also assign the return value of snd_info_init() to the 'err' variable instead of hardcoding -ENOMEM to ensure consistency and future-proofing. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260703103840.253527-1-phucduc.bui@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
b8c89ae642
commit
bd8f218761
1 changed files with 10 additions and 4 deletions
Loading…
Add table
Add a link
Reference in a new issue