[PATCH 04/21] omap-sham: use devm_irq_of_parse_and_map()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




From: Nikita Yushchenko <nyushchenko@xxxxxxxxxxxxx>

This avoids leak of IRQ mapping on error paths, and makes it possible
to use devm_request_irq() without facing unmap-while-handler-installed
issues.

Signed-off-by: Nikita Yushchenko <nyushchenko@xxxxxxxxxxxxx>
---
 drivers/crypto/omap-sham.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index 710d863..2975f61 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -1830,8 +1830,8 @@ static int omap_sham_get_res_of(struct omap_sham_dev *dd,
 		goto err;
 	}
 
-	dd->irq = irq_of_parse_and_map(node, 0);
-	if (!dd->irq) {
+	dd->irq = devm_irq_of_parse_and_map(dev, node, 0);
+	if (dd->irq <= 0) {
 		dev_err(dev, "can't translate OF irq value\n");
 		err = -EINVAL;
 		goto err;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux