Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1424693
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RESEND v7 4/6] extcon: max8997: Fix handling error code of regmap_irq_get_virq() |
| Date | 2016-06-17 08:20 +0200 |
| Message-ID | <rKVih-2Tr-7@gated-at.bofh.it> (permalink) |
| References | <rKVih-2Tr-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The regmap_irq_get_virq() can return negative ERRNO, so its result
should not be stored in unsigned int because error would be ignored.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
---
drivers/extcon/extcon-max8997.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c
index 68754ac2c8ea..0afa3e8b5dc3 100644
--- a/drivers/extcon/extcon-max8997.c
+++ b/drivers/extcon/extcon-max8997.c
@@ -660,11 +660,11 @@ static int max8997_muic_probe(struct platform_device *pdev)
for (i = 0; i < ARRAY_SIZE(muic_irqs); i++) {
struct max8997_muic_irq *muic_irq = &muic_irqs[i];
- unsigned int virq = 0;
+ int virq = 0;
virq = regmap_irq_get_virq(max8997->irq_data_muic,
muic_irq->irq);
- if (!virq) {
+ if (virq <= 0) {
ret = -EINVAL;
goto err_irq;
}
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RESEND v7 0/6] regulator: mfd: max8997: Add regmap Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-17 08:20 +0200 [RESEND v7 4/6] extcon: max8997: Fix handling error code of regmap_irq_get_virq() Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-17 08:20 +0200 [RESEND v7 5/6] rtc: max8997: Check for ERRNO of regmap_irq_get_virq() Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-17 08:20 +0200 [RESEND v7 2/6] mfd: max8997: handle IRQs using regmap Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-17 08:20 +0200 [RESEND v7 6/6] extcon: max8997: Fix inconsistent indenting Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-17 08:20 +0200 [RESEND v7 3/6] mfd: max8997: Change irq names to upper case Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-17 08:20 +0200 Re: [RESEND v7 1/6] mfd: max8997: Use regmap to access registers Mark Brown <broonie@kernel.org> - 2016-06-17 15:10 +0200
csiph-web