1
0
Fork 0

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>
hifive-unleashed-5.1
Stephen Hemminger 2015-05-14 09:19:13 -07:00 committed by Greg Kroah-Hartman
parent 5b20a028fa
commit 9ff2c13234
1 changed files with 2 additions and 1 deletions

View File

@ -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));