From 735145acee6d0d37950fcd00d601bf60f1f8ee31 Mon Sep 17 00:00:00 2001 From: skrll Date: Mon, 31 Aug 2015 10:41:22 +0000 Subject: [PATCH] Improve error handling in attach code. From t-hash. --- sys/dev/pci/ehci_pci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/pci/ehci_pci.c b/sys/dev/pci/ehci_pci.c index 6d2ea29e9db3..c814eb2c6f40 100644 --- a/sys/dev/pci/ehci_pci.c +++ b/sys/dev/pci/ehci_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ehci_pci.c,v 1.61 2015/08/19 06:16:18 skrll Exp $ */ +/* $NetBSD: ehci_pci.c,v 1.62 2015/08/31 10:41:22 skrll Exp $ */ /* * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.61 2015/08/19 06:16:18 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.62 2015/08/31 10:41:22 skrll Exp $"); #include #include @@ -183,7 +183,7 @@ ehci_pci_attach(device_t parent, device_t self, void *aux) if (intrstr != NULL) aprint_error(" at %s", intrstr); aprint_error("\n"); - return; + goto fail; } aprint_normal_dev(self, "interrupting at %s\n", intrstr); @@ -193,7 +193,7 @@ ehci_pci_attach(device_t parent, device_t self, void *aux) case PCI_USBREV_1_1: sc->sc.sc_bus.usbrev = USBREV_UNKNOWN; aprint_verbose_dev(self, "pre-2.0 USB rev\n"); - return; + goto fail; case PCI_USBREV_2_0: sc->sc.sc_bus.usbrev = USBREV_2_0; break;