Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1583861

[PATCH] irqchip/qcom: Fix error handling

From Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Newsgroups linux.kernel
Subject [PATCH] irqchip/qcom: Fix error handling
Date 2017-02-18 09:50 +0100
Message-ID <tc8Sl-81B-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


'devm_ioremap()' returns NULL on error, not an error pointer.

Fixes: f20cc9b00c7b ("irqchip/qcom: Add IRQ combiner driver")

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/irqchip/qcom-irq-combiner.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/qcom-irq-combiner.c b/drivers/irqchip/qcom-irq-combiner.c
index 03251da95397..226558698344 100644
--- a/drivers/irqchip/qcom-irq-combiner.c
+++ b/drivers/irqchip/qcom-irq-combiner.c
@@ -202,9 +202,9 @@ static acpi_status get_registers_cb(struct acpi_resource *ares, void *context)
 	}
 
 	vaddr = devm_ioremap(ctx->dev, reg->address, REG_SIZE);
-	if (IS_ERR(vaddr)) {
+	if (!vaddr) {
 		dev_err(ctx->dev, "Can't map register @%pa\n", &paddr);
-		ctx->err = PTR_ERR(vaddr);
+		ctx->err = -ENOMEM;
 		return AE_ERROR;
 	}
 
-- 
2.9.3

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] irqchip/qcom: Fix error handling Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-02-18 09:50 +0100
  [tip:irq/core] irqchip/qcom: Fix error handling tip-bot for Christophe JAILLET <tipbot@zytor.com> - 2017-02-18 10:30 +0100
  [tip:irq/core] irqchip/qcom: Fix error handling tip-bot for Christophe JAILLET <tipbot@zytor.com> - 2017-02-19 08:50 +0100

csiph-web