diff options
author | Vincent Whitchurch <vincent.whitchurch@axis.com> | 2022-06-09 16:17:04 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-06-22 14:13:16 +0200 |
commit | 65ca4db68b6819244df9024aea4be55edf8af1ef (patch) | |
tree | e75b325605b80fa162da03204bd91e7360868614 | |
parent | 5334455067d51ea043d302a1d052db9b8af4832e (diff) | |
download | linux-stable-65ca4db68b6819244df9024aea4be55edf8af1ef.tar.gz linux-stable-65ca4db68b6819244df9024aea4be55edf8af1ef.tar.bz2 linux-stable-65ca4db68b6819244df9024aea4be55edf8af1ef.zip |
tty: goldfish: Fix free_irq() on remove
[ Upstream commit 499e13aac6c762e1e828172b0f0f5275651d6512 ]
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: 465893e18878e119 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/tty/goldfish.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/goldfish.c b/drivers/tty/goldfish.c index abc84d84f638..9180ca5e4dcd 100644 --- a/drivers/tty/goldfish.c +++ b/drivers/tty/goldfish.c @@ -428,7 +428,7 @@ static int goldfish_tty_remove(struct platform_device *pdev) tty_unregister_device(goldfish_tty_driver, qtty->console.index); iounmap(qtty->base); qtty->base = NULL; - free_irq(qtty->irq, pdev); + free_irq(qtty->irq, qtty); tty_port_destroy(&qtty->port); goldfish_tty_current_line_count--; if (goldfish_tty_current_line_count == 0) |