From: Christophe JAILLET Date: Sat, 18 Feb 2017 08:34:34 +0000 (+0100) Subject: irqchip/qcom: Fix error handling X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3900dea4cda7c28d7921370bc4d22b08463ed94c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git irqchip/qcom: Fix error handling 'devm_ioremap()' returns NULL on error, not an error pointer. Fixes: f20cc9b00c7b ("irqchip/qcom: Add IRQ combiner driver") Signed-off-by: Christophe JAILLET Cc: marc.zyngier@arm.com Cc: kernel-janitors@vger.kernel.org Cc: jason@lakedaemon.net Link: http://lkml.kernel.org/r/20170218083434.2289-1-christophe.jaillet@wanadoo.fr Signed-off-by: Thomas Gleixner --- 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; }