mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
ALSA: pcmtest: Honor the enable parameter
The enable module parameter is declared and documented as "Enable
pcmtest soundcard.", but nothing reads it. Loading the module with
enable=0 still creates the card.
Return -ENODEV from mod_init() when enable is false, as the pcsp driver
does.
Fixes: 315a3d57c6 ("ALSA: Implement the new Virtual PCM Test Driver")
Signed-off-by: HyeongJun An <sammiee5311@gmail.com>
Link: https://patch.msgid.link/20261027012228.3797565-1-sammiee5311@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
493a77a9f2
commit
fe3b45a087
|
|
@ -712,6 +712,9 @@ static int __init mod_init(void)
|
|||
{
|
||||
int err = 0;
|
||||
|
||||
if (!enable)
|
||||
return -ENODEV;
|
||||
|
||||
buf_allocated = setup_patt_bufs();
|
||||
if (!buf_allocated)
|
||||
return -ENOMEM;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user