From: Milton Miller Date: Thu, 8 Jan 2009 02:14:21 +0000 (+0000) Subject: hvc_console: Call free_irq() only if request_irq() was successful X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c21f7a527f7757a0e246cea521a5dd3b8e1224d5;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git hvc_console: Call free_irq() only if request_irq() was successful Only call free_irq if we marked the request_irq has having succeeded instead of whenever the the sub-driver identified the interrupt to use. Signed-off-by: Milton Miller Signed-off-by: Benjamin Herrenschmidt --- diff --git a/drivers/char/hvc_irq.c b/drivers/char/hvc_irq.c index d09e5688d449..2623e177e8d6 100644 --- a/drivers/char/hvc_irq.c +++ b/drivers/char/hvc_irq.c @@ -37,7 +37,7 @@ int notifier_add_irq(struct hvc_struct *hp, int irq) void notifier_del_irq(struct hvc_struct *hp, int irq) { - if (!irq) + if (!hp->irq_requested) return; free_irq(irq, hp); hp->irq_requested = 0;