diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2014-04-18 16:47:30 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-30 20:13:53 -0700 |
commit | eb5adaa8b70a63e549a02c45570cd255ee0025aa (patch) | |
tree | ce0ef381c450689c8fcbc087f1ab8417de170682 | |
parent | cc5dbe7fcb0db79f405cc780c42f70ce003b5222 (diff) | |
download | lwn-eb5adaa8b70a63e549a02c45570cd255ee0025aa.tar.gz lwn-eb5adaa8b70a63e549a02c45570cd255ee0025aa.zip |
extcon: max14577: Properly handle regmap_irq_get_virq error
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 <k.kozlowski@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/extcon/extcon-max14577.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c index 1fef08dc7c0f..5c948c9625d2 100644 --- a/drivers/extcon/extcon-max14577.c +++ b/drivers/extcon/extcon-max14577.c @@ -650,7 +650,7 @@ static int max14577_muic_probe(struct platform_device *pdev) 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; |