Date: Fri, 7 Sep 2018 16:17:28 -0400 From: Mark Johnston <markj@freebsd.org> To: Yuri Pankov <yuripv@yuripv.net> Cc: freebsd-hackers <freebsd-hackers@freebsd.org> Subject: Re: intelspi: fix "Device leaked IRQ resources" Message-ID: <20180907201728.GI63224@raichu> In-Reply-To: <1edec70d-8ba3-56c8-d25e-1aef9458452e@yuripv.net> References: <1edec70d-8ba3-56c8-d25e-1aef9458452e@yuripv.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 07, 2018 at 10:56:51PM +0300, Yuri Pankov wrote: > A simple fix for an obvious typo, leading to "Device leaked IRQ > resources" on attach failure or detach. Thanks, I'll submit this to re@. > 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); > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180907201728.GI63224>