Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1411043 > unrolled thread
| Started by | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| First post | 2016-06-01 12:00 +0200 |
| Last post | 2016-06-01 12:00 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v7 5/6] rtc: max8997: Check for ERRNO of regmap_irq_get_virq() Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-01 12:00 +0200
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Date | 2016-06-01 12:00 +0200 |
| Subject | [PATCH v7 5/6] rtc: max8997: Check for ERRNO of regmap_irq_get_virq() |
| Message-ID | <rFb6q-6Mh-7@gated-at.bofh.it> |
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>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.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 top | Article view | linux.kernel
csiph-web