Message ID | 1424555126-26151-1-git-send-email-olli.salonen@iki.fi (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sat, Feb 21, 2015 at 4:45 PM, Olli Salonen <olli.salonen@iki.fi> wrote: > Free the IRQ before disabling the device. Otherwise errors like this when unloading the module: > > [21135.458560] ------------[ cut here ]------------ > [21135.458569] WARNING: CPU: 4 PID: 1696 at /home/apw/COD/linux/fs/proc/generic.c:521 remove_proc_entry+0x1a1/0x1b0() > [21135.458572] remove_proc_entry: removing non-empty directory 'irq/47', leaking at least 'saa7164[0]' > > Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Thx. Reviewed-by: Steven Toth <stoth@kernellabs.com>
diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c index 4b0bec3..9cf3c6c 100644 --- a/drivers/media/pci/saa7164/saa7164-core.c +++ b/drivers/media/pci/saa7164/saa7164-core.c @@ -1436,11 +1436,11 @@ static void saa7164_finidev(struct pci_dev *pci_dev) saa7164_i2c_unregister(&dev->i2c_bus[1]); saa7164_i2c_unregister(&dev->i2c_bus[2]); - pci_disable_device(pci_dev); - /* unregister stuff */ free_irq(pci_dev->irq, dev); + pci_disable_device(pci_dev); + mutex_lock(&devlist); list_del(&dev->devlist); mutex_unlock(&devlist);
Free the IRQ before disabling the device. Otherwise errors like this when unloading the module: [21135.458560] ------------[ cut here ]------------ [21135.458569] WARNING: CPU: 4 PID: 1696 at /home/apw/COD/linux/fs/proc/generic.c:521 remove_proc_entry+0x1a1/0x1b0() [21135.458572] remove_proc_entry: removing non-empty directory 'irq/47', leaking at least 'saa7164[0]' Signed-off-by: Olli Salonen <olli.salonen@iki.fi> --- drivers/media/pci/saa7164/saa7164-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)