summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2015-05-14 09:19:13 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-24 11:55:15 -0700
commit9ff2c132345cab8972a2bd29069aa52a3cadbbcc (patch)
tree0c4711947fd75fdaf88df0aef5b85ca23d453496
parent5b20a028faa15477dcd195c85173bb118eb23b3d (diff)
downloadlinux-9ff2c132345cab8972a2bd29069aa52a3cadbbcc.tar.gz
linux-9ff2c132345cab8972a2bd29069aa52a3cadbbcc.tar.bz2
linux-9ff2c132345cab8972a2bd29069aa52a3cadbbcc.zip
uio: don't free irq that was not requested
UIO base driver should only free_irq that it has requested. UIO supports drivers without interrupts (irq == 0) or custom handlers. This fixes warnings like: WARNING: CPU: 1 PID: 5478 at kernel/irq/manage.c:1244 __free_irq+0xa9/0x1e0() Trying to free already-free IRQ 0 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/uio/uio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
index 65bf0676d54a..3257d4220d01 100644
--- a/drivers/uio/uio.c
+++ b/drivers/uio/uio.c
@@ -879,7 +879,8 @@ void uio_unregister_device(struct uio_info *info)
uio_dev_del_attributes(idev);
- free_irq(idev->info->irq, idev);
+ if (info->irq && info->irq != UIO_IRQ_CUSTOM)
+ free_irq(info->irq, idev);
device_destroy(&uio_class, MKDEV(uio_major, idev->minor));