mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
genirq: devres: Fix testing return value of request_any_context_irq()
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: 0668d30651 ("genirq: Add devm_request_any_context_irq()")
Signed-off-by: Axel Lin <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
dbf07cf0c8
commit
63781394c5
1 changed files with 2 additions and 2 deletions
|
|
@ -104,7 +104,7 @@ int devm_request_any_context_irq(struct device *dev, unsigned int irq,
|
|||
return -ENOMEM;
|
||||
|
||||
rc = request_any_context_irq(irq, handler, irqflags, devname, dev_id);
|
||||
if (rc) {
|
||||
if (rc < 0) {
|
||||
devres_free(dr);
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -113,7 +113,7 @@ int devm_request_any_context_irq(struct device *dev, unsigned int irq,
|
|||
dr->dev_id = dev_id;
|
||||
devres_add(dev, dr);
|
||||
|
||||
return 0;
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL(devm_request_any_context_irq);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue