From: H Hartley Sweeten Date: Tue, 29 Jul 2014 22:01:31 +0000 (-0700) Subject: staging: comedi: ni_6527: iounmap resource when detached X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c6f71be317de7f97f569bd0928e8a1b9586970cf;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: ni_6527: iounmap resource when detached PCI bar 1 is ioremap'ed during the (*auto_attach). This resource needs to be iounmap'ed when the driver is (*detach)ed. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_6527.c b/drivers/staging/comedi/drivers/ni_6527.c index 6f9ca7ca1245..e84dac2bf3b2 100644 --- a/drivers/staging/comedi/drivers/ni_6527.c +++ b/drivers/staging/comedi/drivers/ni_6527.c @@ -474,6 +474,8 @@ static void ni6527_detach(struct comedi_device *dev) ni6527_reset(dev); if (dev->irq) free_irq(dev->irq, dev); + if (dev->mmio) + iounmap(dev->mmio); comedi_pci_disable(dev); }