summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_url.c
diff options
context:
space:
mode:
authormrg <mrg@NetBSD.org>2019-08-30 05:59:17 +0000
committermrg <mrg@NetBSD.org>2019-08-30 05:59:17 +0000
commit2af3a7016fa07b2b15dd2ef030d7bf26551393b1 (patch)
treece5c51b4dd5a2a61bb1e74ee2fad615da435a25b /sys/dev/usb/if_url.c
parent3acc8a037331eeab840775f4381cc148685a7edb (diff)
don't try to set dying when we haven't usbnet_attach()d yet.
reported by maxv.
Diffstat (limited to 'sys/dev/usb/if_url.c')
-rw-r--r--sys/dev/usb/if_url.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c
index b14eb0dd724..3e5c87d8652 100644
--- a/sys/dev/usb/if_url.c
+++ b/sys/dev/usb/if_url.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_url.c,v 1.70 2019/08/23 04:32:57 mrg Exp $ */
+/* $NetBSD: if_url.c,v 1.71 2019/08/30 05:59:17 mrg Exp $ */
/*
* Copyright (c) 2001, 2002
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.70 2019/08/23 04:32:57 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.71 2019/08/30 05:59:17 mrg Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -190,7 +190,7 @@ url_attach(device_t parent, device_t self, void *aux)
if (err) {
aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(err));
- goto bad;
+ return;
}
/* get control interface */
@@ -198,7 +198,7 @@ url_attach(device_t parent, device_t self, void *aux)
if (err) {
aprint_error_dev(self, "failed to get interface, err=%s\n",
usbd_errstr(err));
- goto bad;
+ return;
}
un->un_iface = iface;
@@ -221,7 +221,7 @@ url_attach(device_t parent, device_t self, void *aux)
if (ed == NULL) {
aprint_error_dev(self,
"couldn't get endpoint %d\n", i);
- goto bad;
+ return;
}
if ((ed->bmAttributes & UE_XFERTYPE) == UE_BULK &&
UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN)
@@ -238,7 +238,7 @@ url_attach(device_t parent, device_t self, void *aux)
un->un_ed[USBNET_ENDPT_TX] == 0 ||
un->un_ed[USBNET_ENDPT_INTR] == 0) {
aprint_error_dev(self, "missing endpoint\n");
- goto bad;
+ return;
}
/* Set these up now for url_mem(). */