diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2008-01-14 01:25:51 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2008-01-14 01:25:51 +0000 |
commit | 6f3c846f8cbd20eb504ec9b840b0e66d772df8bd (patch) | |
tree | a9c95dce8da40cdc5d82a34963ab6839bfec7c22 | |
parent | c25ece3d323aafe5e147e8fdc7ca2dfe61538100 (diff) |
return earlier if the device index is negative
ok ratchov
-rw-r--r-- | sys/dev/isa/sbdsp.c | 5 |
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; |