Author: gonzo
Date: Sun Oct  9 04:37:21 2016
New Revision: 306899
URL: https://svnweb.freebsd.org/changeset/base/306899

Log:
  Fix release MSI method for ARM GIC

Modified:
  head/sys/arm/arm/gic.c

Modified: head/sys/arm/arm/gic.c
==============================================================================
--- head/sys/arm/arm/gic.c      Sun Oct  9 04:36:40 2016        (r306898)
+++ head/sys/arm/arm/gic.c      Sun Oct  9 04:37:21 2016        (r306899)
@@ -1474,15 +1474,15 @@ arm_gicv2m_release_msi(device_t dev, dev
 
        mtx_lock(&sc->sc_mutex);
        for (i = 0; i < count; i++) {
-               gi = (struct gic_irqsrc *)isrc;
+               gi = (struct gic_irqsrc *)isrc[i];
 
                KASSERT((gi->gi_flags & GI_FLAG_MSI_USED) == GI_FLAG_MSI_USED,
                    ("%s: Trying to release an unused MSI-X interrupt",
                    __func__));
 
                gi->gi_flags &= ~GI_FLAG_MSI_USED;
-               mtx_unlock(&sc->sc_mutex);
        }
+       mtx_unlock(&sc->sc_mutex);
 
        return (0);
 }
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to