All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sh: maple: use the matching IRQ cookie
@ 2026-10-09  4:02 Runyu Xiao
  2026-10-16 14:04 ` John Paul Adrian Glaubitz
  2026-10-17 18:22 ` Florian Fuchs
  0 siblings, 2 replies; 4+ messages in thread
From: Runyu Xiao @ 2026-10-09  4:02 UTC (permalink / raw)
  To: Yoshinori Sato
  Cc: Rich Felker, John Paul Adrian Glaubitz, linux-sh, linux-kernel,
	stable, Runyu Xiao, Jianhao Xu

The Maple DMA and VBLANK handlers are registered with
&maple_unsupported_device as their dev_id. Passing NULL to free_irq()
cannot find either action, so the handlers remain registered and the
IRQ core warns.

Use the same cookie when freeing both handlers on the error paths.

Fixes: 17be2d2b1c33 ("sh: Add maple bus support for the SEGA Dreamcast.")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
---
 drivers/sh/maple/maple.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/sh/maple/maple.c b/drivers/sh/maple/maple.c
index 5585f220e..7df88e00c 100644
--- a/drivers/sh/maple/maple.c
+++ b/drivers/sh/maple/maple.c
@@ -863,10 +863,10 @@ static int __init maple_bus_init(void)
 	kmem_cache_destroy(maple_queue_cache);
 
 cleanup_bothirqs:
-	free_irq(HW_EVENT_VSYNC, 0);
+	free_irq(HW_EVENT_VSYNC, &maple_unsupported_device);
 
 cleanup_irq:
-	free_irq(HW_EVENT_MAPLE_DMA, 0);
+	free_irq(HW_EVENT_MAPLE_DMA, &maple_unsupported_device);
 
 cleanup_dma:
 	free_pages((unsigned long) maple_sendbuf, MAPLE_DMA_PAGES);
-- 
2.34.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-17 18:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-09  4:02 [PATCH] sh: maple: use the matching IRQ cookie Runyu Xiao
2026-10-16 14:04 ` John Paul Adrian Glaubitz
2026-10-17 18:22 ` Florian Fuchs
2026-10-17 18:34   ` John Paul Adrian Glaubitz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.