[Bug 261071] snd_midi: unit 0 cannot have 2 or more channels
Date: Mon, 10 Jan 2022 03:30:28 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261071
Bug ID: 261071
Summary: snd_midi: unit 0 cannot have 2 or more channels
Product: Base System
Version: 13.0-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: bugs@FreeBSD.org
Reporter: masatic.bsd@e-koubou.net
Created attachment 230855
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=230855&action=edit
patch, for 13.0-Release-p4
midi_init uses 0 as auto-allocate unit number, but unit 0 is also a valid unit
number.
This confliction makes secondary function call to allocate another channel for
unit 0 is treated as auto-allocate and returns non-0 unit as result
incorrectly.
Attached patch fixes this problem, auto-allocate number is changed from 0 to
-1.
--
You are receiving this mail because:
You are the assignee for the bug.