Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Compare against 0 for missing endpoint. From mrg@



details:   https://anonhg.NetBSD.org/src/rev/9be038d19c00
branches:  trunk
changeset: 964583:9be038d19c00
user:      skrll <skrll%NetBSD.org@localhost>
date:      Wed Aug 07 20:34:12 2019 +0000

description:
Compare against 0 for missing endpoint.  From mrg@

diffstat:

 sys/dev/usb/if_udav.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r b369ef6e8457 -r 9be038d19c00 sys/dev/usb/if_udav.c
--- a/sys/dev/usb/if_udav.c     Wed Aug 07 19:58:50 2019 +0000
+++ b/sys/dev/usb/if_udav.c     Wed Aug 07 20:34:12 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_udav.c,v 1.61 2019/08/07 19:21:48 skrll Exp $       */
+/*     $NetBSD: if_udav.c,v 1.62 2019/08/07 20:34:12 skrll Exp $       */
 /*     $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $   */
 
 /*
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.61 2019/08/07 19:21:48 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.62 2019/08/07 20:34:12 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -232,9 +232,9 @@
                        un->un_ed[USBNET_ENDPT_INTR] = ed->bEndpointAddress;
        }
 
-       if (un->un_ed[USBNET_ENDPT_RX] == -1 ||
-           un->un_ed[USBNET_ENDPT_TX] == -1 ||
-           un->un_ed[USBNET_ENDPT_INTR] == -1) {
+       if (un->un_ed[USBNET_ENDPT_RX] == 0 ||
+           un->un_ed[USBNET_ENDPT_TX] == 0 ||
+           un->un_ed[USBNET_ENDPT_INTR] == 0) {
                aprint_error_dev(self, "missing endpoint\n");
                return;
        }



Home | Main Index | Thread Index | Old Index