Thread (151 messages) 151 messages, 10 authors, 2014-07-06
STALE4387d

[PATCH 3.15 006/139] extcon: max14577: Properly handle regmap_irq_get_virq error

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2014-06-28 17:51:22
Also in: lkml

3.15-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Krzysztof Kozlowski <redacted>

commit 369afd4ba22f5b8de0c9229b6e62b3f9e2207034 upstream.

The regmap_irq_get_virq may return 0 or -EINVAL on error. Fail the probe
in both situations.

Signed-off-by: Krzysztof Kozlowski <redacted>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/extcon/extcon-max14577.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/extcon/extcon-max14577.c
+++ b/drivers/extcon/extcon-max14577.c
@@ -650,7 +650,7 @@ static int max14577_muic_probe(struct pl
 		unsigned int virq = 0;
 
 		virq = regmap_irq_get_virq(max14577->irq_data, muic_irq->irq);
-		if (!virq)
+		if (virq <= 0)
 			return -EINVAL;
 		muic_irq->virq = virq;
 

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help