Skip to content

Commit 499e13a

Browse files
vwaxgregkh
authored andcommitted
tty: goldfish: Fix free_irq() on remove
Pass the correct dev_id to free_irq() to fix this splat when the driver is unbound: WARNING: CPU: 0 PID: 30 at kernel/irq/manage.c:1895 free_irq Trying to free already-free IRQ 65 Call Trace: warn_slowpath_fmt free_irq goldfish_tty_remove platform_remove device_remove device_release_driver_internal device_driver_detach unbind_store drv_attr_store ... Fixes: 465893e ("tty: goldfish: support platform_device with id -1") Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Link: https://lore.kernel.org/r/20220609141704.1080024-1-vincent.whitchurch@axis.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 654a8d6 commit 499e13a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/tty/goldfish.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ static int goldfish_tty_remove(struct platform_device *pdev)
426426
tty_unregister_device(goldfish_tty_driver, qtty->console.index);
427427
iounmap(qtty->base);
428428
qtty->base = NULL;
429-
free_irq(qtty->irq, pdev);
429+
free_irq(qtty->irq, qtty);
430430
tty_port_destroy(&qtty->port);
431431
goldfish_tty_current_line_count--;
432432
if (goldfish_tty_current_line_count == 0)

0 commit comments

Comments
 (0)