The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] uio: don't free irq that was not requested
@ 2015-05-14 16:19 Stephen Hemminger
  0 siblings, 0 replies; only message in thread
From: Stephen Hemminger @ 2015-05-14 16:19 UTC (permalink / raw)
  To: Hans J. Koch, Greg Kroah-Hartman; +Cc: linux-kernel

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>

--- a/drivers/uio/uio.c	2015-05-14 09:04:54.677283462 -0700
+++ b/drivers/uio/uio.c	2015-05-14 09:09:28.170547587 -0700
@@ -879,7 +879,8 @@ void uio_unregister_device(struct uio_in
 
 	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));
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-14 16:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-14 16:19 [PATCH] uio: don't free irq that was not requested Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox