sndstat_register may return EINVAL if a device is not named "pcm" or "midi".
This commit makes pcm_register bubble up the error to its caller instead of
silently ignoring it and allowing a sound driver to continue initialization.
This should not affect in-tree drivers, but is useful for debugging new ones.
Details
Details
I checked that my out-of-tree virtio sound driver still works in QEMU
https://github.com/ayrtonm/freebsd-src/tree/virtio_snd
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 69436 Build 66319: arc lint + arc unit
Event Timeline
Comment Actions
sndstat_register() always returns 0, so perhaps the change instead should be to make the function void.
Comment Actions
Here's the branch in sndstat_register returning EINVAL
https://cgit.freebsd.org/src/tree/sys/dev/sound/pcm/sndstat.c#n1170
Comment Actions
Oh, right. I forgot this because I already have a patch to remove this chunk (D54141). I can convert the function to void there instead.