Post by Yuri PankovA simple fix for an obvious typo, leading to "Device leaked IRQ
resources" on attach failure or detach.
diff --git a/sys/dev/intel/spi.c b/sys/dev/intel/spi.c
index 9b229bb74123..575240fc3167 100644
--- a/sys/dev/intel/spi.c
+++ b/sys/dev/intel/spi.c
@@ -480,7 +480,7 @@ intelspi_attach(device_t dev)
sc->sc_mem_rid, sc->sc_mem_res);
if (sc->sc_irq_res != NULL)
- bus_release_resource(dev, SYS_RES_MEMORY,
+ bus_release_resource(dev, SYS_RES_IRQ,
sc->sc_irq_rid, sc->sc_irq_res);
return (ENXIO);
@@ -503,7 +503,7 @@ intelspi_detach(device_t dev)
sc->sc_mem_rid, sc->sc_mem_res);
if (sc->sc_irq_res != NULL)
- bus_release_resource(dev, SYS_RES_MEMORY,
+ bus_release_resource(dev, SYS_RES_IRQ,
sc->sc_irq_rid, sc->sc_irq_res);
return (0);
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers