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-next>] [day] [month] [year] [list]
Message-Id: <20200319012940.14490-1-marek.behun@nic.cz>
Date:   Thu, 19 Mar 2020 02:29:40 +0100
From:   Marek Behún <marek.behun@....cz>
To:     netdev@...r.kernel.org
Cc:     Marek Behún <marek.behun@....cz>,
        Chris Packham <chris.packham@...iedtelesis.co.nz>,
        Andrew Lunn <andrew@...n.ch>
Subject: [PATCH net-next] net: mvmdio: fix driver probe on missing irq

Commit e1f550dc44a4 made the use of platform_get_irq_optional, which can
return -ENXIO when interrupt is missing. Handle this as non-error,
otherwise the driver won't probe.

Fixes: e1f550dc44a4 ("net: mvmdio: avoid error message for optional...")
Signed-off-by: Marek Behún <marek.behun@....cz>
Cc: Chris Packham <chris.packham@...iedtelesis.co.nz>
Cc: Andrew Lunn <andrew@...n.ch>
---
 drivers/net/ethernet/marvell/mvmdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index d2e2dc538428..f9f09da57031 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -364,7 +364,7 @@ static int orion_mdio_probe(struct platform_device *pdev)
 		writel(MVMDIO_ERR_INT_SMI_DONE,
 			dev->regs + MVMDIO_ERR_INT_MASK);
 
-	} else if (dev->err_interrupt < 0) {
+	} else if (dev->err_interrupt < 0 && dev->err_interrupt != -ENXIO) {
 		ret = dev->err_interrupt;
 		goto out_mdio;
 	}
-- 
2.24.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ