Page MenuHomeFreeBSD

D61506.1794684724.diff
No OneTemporary

Authored By
Unknown
Size
792 B
Referenced Files
None
Subscribers
None

D61506.1794684724.diff

diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c
--- a/sys/dev/sound/usb/uaudio.c
+++ b/sys/dev/sound/usb/uaudio.c
@@ -1148,7 +1148,12 @@
bus_attach_children(dev);
- if (uaudio_handle_hid) {
+ /*
+ * Gate on mixer_dev, otherwise a device with no audio interfaces, such
+ * as a MIDI-only keyboard, and we will end up using an uninitialized
+ * mutex.
+ */
+ if (uaudio_handle_hid && sc->sc_child[0].mixer_dev != NULL) {
if (uaudio_hid_attach(sc, uaa) == 0) {
device_printf(dev, "HID volume keys found.\n");
} else {
@@ -1157,7 +1162,8 @@
}
/* reload all mixer settings */
- uaudio_mixer_reload_all(sc);
+ if (sc->sc_child[0].mixer_dev != NULL)
+ uaudio_mixer_reload_all(sc);
/* enable S/PDIF output, if any */
if (sc->sc_set_spdif_fn(sc,

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 14, 7:32 PM (14 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41723514
Default Alt Text
D61506.1794684724.diff (792 B)

Event Timeline