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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun,  3 Dec 2017 00:56:22 +0530
From:   Arvind Yadav <arvind.yadav.cs@...il.com>
To:     wg@...ndegger.com, mkl@...gutronix.de, michal.simek@...inx.com,
        opendmb@...il.com, f.fainelli@...il.com, davem@...emloft.net,
        Vladislav.Zakharov@...opsys.com
Cc:     linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        netdev@...r.kernel.org
Subject: [PATCH 10/10] net: ethernet: cpmac: Handle return value of platform_get_irq_byname

platform_get_irq_byname() can fail here and we must check its return
value

Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
---
 drivers/net/ethernet/ti/cpmac.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c
index 9b8a30b..f3acfc0 100644
--- a/drivers/net/ethernet/ti/cpmac.c
+++ b/drivers/net/ethernet/ti/cpmac.c
@@ -1124,6 +1124,10 @@ static int cpmac_probe(struct platform_device *pdev)
 	}
 
 	dev->irq = platform_get_irq_byname(pdev, "irq");
+	if (dev->irq < 0) {
+		rc = dev->irq;
+		goto fail;
+	}
 
 	dev->netdev_ops = &cpmac_netdev_ops;
 	dev->ethtool_ops = &cpmac_ethtool_ops;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ