Date: Sat, 1 Jun 2019 18:19:16 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348497 - head/sys/mips/cavium/usb Message-ID: <201906011819.x51IJGie041477@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Sat Jun 1 18:19:16 2019 New Revision: 348497 URL: https://svnweb.freebsd.org/changeset/base/348497 Log: octusb: fix detach loop over USB ports MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/mips/cavium/usb/octusb_octeon.c Modified: head/sys/mips/cavium/usb/octusb_octeon.c ============================================================================== --- head/sys/mips/cavium/usb/octusb_octeon.c Sat Jun 1 16:04:20 2019 (r348496) +++ head/sys/mips/cavium/usb/octusb_octeon.c Sat Jun 1 18:19:16 2019 (r348497) @@ -179,12 +179,12 @@ octusb_octeon_detach(device_t dev) if (nports > OCTUSB_MAX_PORTS) panic("octusb: too many USB ports %d", nports); for (i = 0; i < nports; i++) { - if (sc->sc_dci.sc_irq_res[0] && sc->sc_dci.sc_intr_hdl[0]) { + if (sc->sc_dci.sc_irq_res[i] && sc->sc_dci.sc_intr_hdl[i]) { err = bus_teardown_intr(dev, sc->sc_dci.sc_irq_res[i], sc->sc_dci.sc_intr_hdl[i]); sc->sc_dci.sc_intr_hdl[i] = NULL; } - if (sc->sc_dci.sc_irq_res) { + if (sc->sc_dci.sc_irq_res[i]) { bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_dci.sc_irq_res[i]); sc->sc_dci.sc_irq_res[i] = NULL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906011819.x51IJGie041477>