summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/isa/sbdsp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/isa/sbdsp.c b/sys/dev/isa/sbdsp.c
index c7a2a2a43f9..2f4ee99385d 100644
--- a/sys/dev/isa/sbdsp.c
+++ b/sys/dev/isa/sbdsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sbdsp.c,v 1.26 2007/11/05 00:17:28 jakemsr Exp $ */
+/* $OpenBSD: sbdsp.c,v 1.27 2008/01/14 01:25:50 jakemsr Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@@ -1902,6 +1902,9 @@ sbdsp_mixer_query_devinfo(addr, dip)
DPRINTF(("sbdsp_mixer_query_devinfo: model=%d index=%d\n",
sc->sc_mixer_model, dip->index));
+ if (dip->index < 0)
+ return ENXIO;
+
if (sc->sc_mixer_model == SBM_NONE)
return ENXIO;