Discussion:
intelspi: fix "Device leaked IRQ resources"
Yuri Pankov
2018-09-07 19:56:51 UTC
Permalink
A simple fix for an obvious typo, leading to "Device leaked IRQ
resources" on attach failure or detach.
Mark Johnston
2018-09-07 20:17:28 UTC
Permalink
Post by Yuri Pankov
A 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
Loading...