xen/arm: setup_dt_irq: don't enable the IRQ if the creation has failed

For now __setup_dt_irq can only fail if the action is already set. If in the
future, the function is updated we don't want to enable the IRQ.

Assuming the function can fail with action = NULL, when Xen will receive the
IRQ it will segfault because do_IRQ doesn't check if action is NULL.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
Julien Grall authored and Ian Campbell committed 2014-03-12 13:48:33 +00:00
1 parent d600fcea49
commit 2cf484cee0
1 file changed
+2 -2
+2 -2
View File
@@ -608,8 +608,8 @@ int __init setup_dt_irq(const struct dt_irq *irq, struct irqaction *new)
rc = __setup_irq(desc, irq->irq, new);
spin_unlock_irqrestore(&desc->lock, flags);
desc->handler->startup(desc);
if ( !rc )
desc->handler->startup(desc);
return rc;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.