Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/allwinner Return if ohci_init fails.



details:   https://anonhg.NetBSD.org/src/rev/6c5b98c77849
branches:  trunk
changeset: 330112:6c5b98c77849
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Jun 23 07:29:42 2014 +0000

description:
Return if ohci_init fails.

diffstat:

 sys/arch/arm/allwinner/awin_usb.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r f66db2bbabb2 -r 6c5b98c77849 sys/arch/arm/allwinner/awin_usb.c
--- a/sys/arch/arm/allwinner/awin_usb.c Mon Jun 23 06:57:31 2014 +0000
+++ b/sys/arch/arm/allwinner/awin_usb.c Mon Jun 23 07:29:42 2014 +0000
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: awin_usb.c,v 1.10 2014/02/20 21:48:38 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_usb.c,v 1.11 2014/06/23 07:29:42 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -139,11 +139,12 @@
        int error = ohci_init(sc);
        if (error != USBD_NORMAL_COMPLETION) {
                aprint_error_dev(self, "init failed, error=%d\n", error);
-       } else {
-               /* Attach usb device. */
-               sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint);
+               return;
        }
 
+       /* Attach usb device. */
+       sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint);
+
        const int irq = awinusb_ohci_irqs[usbaa->usbaa_port];
        usbsc->usbsc_ohci_ih = intr_establish(irq, IPL_USB,
            IST_LEVEL, ohci_intr, sc);



Home | Main Index | Thread Index | Old Index