OSDN Git Service

genirq: devres: Fix testing return value of request_any_context_irq()
authorAxel Lin <axel.lin@ingics.com>
Mon, 11 May 2015 09:02:58 +0000 (17:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Jul 2015 17:10:14 +0000 (10:10 -0700)
commitd136139d196aa905952f020992fe8cae17e4f614
treeb7ecfbd63fcf46b8e943a5a8cd2585d068a5cad0
parentf38f2f4816e8ce4ec41b39b024d97964be55f5ca
genirq: devres: Fix testing return value of request_any_context_irq()

commit 63781394c540dd9e666a6b21d70b64dd52bce76e upstream.

request_any_context_irq() returns a negative value on failure.
It returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED on success.
So fix testing return value of request_any_context_irq().

Also fixup the return value of devm_request_any_context_irq() to make it
consistent with request_any_context_irq().

Fixes: 0668d3065128 ("genirq: Add devm_request_any_context_irq()")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Link: http://lkml.kernel.org/r/1431334978.17783.4.camel@ingics.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/irq/devres.c