mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] genirq: error reporting for non-percpu interrupt in request_percpu_irq()
@ 2013-10-18 10:06 Vinayak Kale
  2013-10-18 10:09 ` Vinayak Kale
  2013-10-18 10:31 ` Will Deacon
  0 siblings, 2 replies; 7+ messages in thread
From: Vinayak Kale @ 2013-10-18 10:06 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel; +Cc: tglx, will.deacon, Vinayak Kale

Return a separate error code when a non-percpu interrupt is passed to
request_percpu_irq().

Suggested-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Vinayak Kale <vkale@apm.com>
---
 kernel/irq/manage.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 514bcfd..c2713ae 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1671,10 +1671,12 @@ int request_percpu_irq(unsigned int irq, irq_handler_t handler,
 		return -EINVAL;
 
 	desc = irq_to_desc(irq);
-	if (!desc || !irq_settings_can_request(desc) ||
-	    !irq_settings_is_per_cpu_devid(desc))
+	if (!desc || !irq_settings_can_request(desc))
 		return -EINVAL;
 
+	if (!irq_settings_is_per_cpu_devid(desc))
+		return -EPERM;
+
 	action = kzalloc(sizeof(struct irqaction), GFP_KERNEL);
 	if (!action)
 		return -ENOMEM;
-- 
1.7.9.5


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

end of thread, other threads:[~2013-10-29 16:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-18 10:06 [PATCH] genirq: error reporting for non-percpu interrupt in request_percpu_irq() Vinayak Kale
2013-10-18 10:09 ` Vinayak Kale
2013-10-29 12:59   ` Thomas Gleixner
2013-10-29 16:15     ` Vinayak Kale
2013-10-18 10:31 ` Will Deacon
2013-10-18 11:03   ` Vinayak Kale
2013-10-18 14:12     ` Vinayak Kale

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®