Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1395666
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v6 6/9] rtc: max8997: Check for ERRNO of regmap_irq_get_virq() |
| Date | 2016-05-06 09:30 +0200 |
| Message-ID | <rvIn0-P0-29@gated-at.bofh.it> (permalink) |
| References | <rvImZ-P0-7@gated-at.bofh.it> <rvIn0-P0-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The regmap_irq_get_virq() can return zero or negative ERRNO, so it is
insufficient to check only for non-zero value.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
drivers/rtc/rtc-max8997.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-max8997.c b/drivers/rtc/rtc-max8997.c
index 4998aee0f07f..1a06e17ebe9b 100644
--- a/drivers/rtc/rtc-max8997.c
+++ b/drivers/rtc/rtc-max8997.c
@@ -497,7 +497,7 @@ static int max8997_rtc_probe(struct platform_device *pdev)
}
virq = regmap_irq_get_virq(max8997->irq_data, MAX8997_PMICIRQ_RTCA1);
- if (!virq) {
+ if (virq <= 0) {
dev_err(&pdev->dev, "Failed to create mapping alarm IRQ\n");
ret = -ENXIO;
goto err_out;
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v6 0/9] mfd: max8997: Add regmap support Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-06 09:30 +0200
[PATCH v6 1/9] input: max8997-haptic: Fix NULL pointer dereference Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-06 09:30 +0200
[PATCH v6 4/9] mfd: max8997: Change irq names to upper case Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-06 09:30 +0200
[PATCH v6 8/9] ARM: dts: exynos: Fix regulator name to avoid forbidden character on exynos4210-trats Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-06 09:30 +0200
[PATCH v6 3/9] mfd: max8997: handle IRQs using regmap Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-06 09:30 +0200
[PATCH v6 6/9] rtc: max8997: Check for ERRNO of regmap_irq_get_virq() Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-06 09:30 +0200
Re: [PATCH v6 6/9] rtc: max8997: Check for ERRNO of regmap_irq_get_virq() Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-05-07 08:50 +0200
[PATCH v6 9/9] ARM: dts: exynos: Add interrupt line to MAX8997 PMIC on exynos4210-trats Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-06 09:30 +0200
[PATCH v6 5/9] extcon: max8997: Fix handling error code of regmap_irq_get_virq() Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-06 09:30 +0200
Re: [PATCH v6 5/9] extcon: max8997: Fix handling error code of regmap_irq_get_virq() Chanwoo Choi <cw00.choi@samsung.com> - 2016-05-10 03:30 +0200
[PATCH v6 7/9] extcon: max8997: Fix inconsistent indenting Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-06 09:40 +0200
Re: [PATCH v6 7/9] extcon: max8997: Fix inconsistent indenting Chanwoo Choi <cw00.choi@samsung.com> - 2016-05-10 03:30 +0200
Re: [PATCH v6 2/9] mfd: max8997: Use regmap to access registers Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-05-06 10:10 +0200
Re: [PATCH v6 1/9] input: max8997-haptic: Fix NULL pointer dereference Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-05-09 18:40 +0200
Re: [PATCH v6 0/9] mfd: max8997: Add regmap support Lee Jones <lee.jones@linaro.org> - 2016-05-09 09:40 +0200
csiph-web