diff options
| author | drochner <drochner@NetBSD.org> | 2008-08-12 16:30:42 +0000 |
|---|---|---|
| committer | drochner <drochner@NetBSD.org> | 2008-08-12 16:30:42 +0000 |
| commit | 95effdc79eaed6f0854bbc44fbb4a9f4b33030a3 (patch) | |
| tree | ce709949a5c4e7a9353fa3c43ddaa75b2069efc8 /sys/dev | |
| parent | 0e6db102ac681ad8c1fd3bc82c11b2f256bdf48e (diff) | |
fix an inconsistency in a check for invalid configuration index vs. value;
noticed by Frank Wille in PR kern/39211, but unrelated to the problem
described (The check can practically never be hit.)
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/usb/usb_subr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 50c2d461d66..00ad6a12bd2 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: usb_subr.c,v 1.160 2008/07/28 15:22:01 drochner Exp $ */ +/* $NetBSD: usb_subr.c,v 1.161 2008/08/12 16:30:42 drochner Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ /* @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.160 2008/07/28 15:22:01 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.161 2008/08/12 16:30:42 drochner Exp $"); #include "opt_compat_netbsd.h" #include "opt_usbverbose.h" @@ -555,7 +555,7 @@ usbd_set_config_index(usbd_device_handle dev, int index, int msg) DPRINTFN(5,("usbd_set_config_index: dev=%p index=%d\n", dev, index)); if (index >= dev->ddesc.bNumConfigurations && - index != USB_UNCONFIG_NO) { + index != USB_UNCONFIG_INDEX) { /* panic? */ printf("usbd_set_config_index: illegal index\n"); return (USBD_INVAL); |
