lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 30 Jun 2017 02:55:03 -0500
From:   "Gustavo A. R. Silva" <garsilva@...eddedor.com>
To:     Dan Williams <dan.j.williams@...el.com>,
        Vinod Koul <vinod.koul@...el.com>
Cc:     dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
        "Gustavo A. R. Silva" <garsilva@...eddedor.com>
Subject: [PATCH] dmaengine: zx: add check on platform_get_irq return value

Check return value from call to platform_get_irq(),
so in case of failure print error message and propagate
the return value.

Signed-off-by: Gustavo A. R. Silva <garsilva@...eddedor.com>
---
 drivers/dma/zx_dma.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/dma/zx_dma.c b/drivers/dma/zx_dma.c
index 2bb6953..26196de 100644
--- a/drivers/dma/zx_dma.c
+++ b/drivers/dma/zx_dma.c
@@ -786,6 +786,11 @@ static int zx_dma_probe(struct platform_device *op)
 	}
 
 	d->irq = platform_get_irq(op, 0);
+	if (d->irq < 0) {
+		dev_err(&op->dev, "failed to get IRQ: %d\n", d->irq);
+		return d->irq;
+	}
+
 	ret = devm_request_irq(&op->dev, d->irq, zx_dma_int_handler,
 			       0, DRIVER_NAME, d);
 	if (ret)
-- 
2.5.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ