[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-63781394c540dd9e666a6b21d70b64dd52bce76e@git.kernel.org>
Date: Wed, 13 May 2015 01:48:55 -0700
From: tip-bot for Axel Lin <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: hpa@...or.com, linux-kernel@...r.kernel.org, mingo@...nel.org,
tglx@...utronix.de, axel.lin@...ics.com, sboyd@...eaurora.org
Subject: [tip:irq/core] genirq: devres:
Fix testing return value of request_any_context_irq()
Commit-ID: 63781394c540dd9e666a6b21d70b64dd52bce76e
Gitweb: http://git.kernel.org/tip/63781394c540dd9e666a6b21d70b64dd52bce76e
Author: Axel Lin <axel.lin@...ics.com>
AuthorDate: Mon, 11 May 2015 17:02:58 +0800
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Wed, 13 May 2015 10:47:37 +0200
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: 0668d3065128 ("genirq: Add devm_request_any_context_irq()")
Signed-off-by: Axel Lin <axel.lin@...ics.com>
Reviewed-by: Stephen Boyd <sboyd@...eaurora.org>
Cc: stable@...r.kernel.org
Link: http://lkml.kernel.org/r/1431334978.17783.4.camel@ingics.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
kernel/irq/devres.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/irq/devres.c b/kernel/irq/devres.c
index d5d0f73..74d90a7 100644
--- a/kernel/irq/devres.c
+++ b/kernel/irq/devres.c
@@ -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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists