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]
Message-Id: <42ed0fb7ef99101d6fd8b799bccb6e2d746939c2.1576520432.git.richardcochran@gmail.com>
Date:   Mon, 16 Dec 2019 10:32:54 -0800
From:   Richard Cochran <richardcochran@...il.com>
To:     netdev@...r.kernel.org
Cc:     linux-arm-kernel@...ts.infradead.org,
        David Miller <davem@...emloft.net>,
        Michal Simek <michal.simek@...inx.com>,
        Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
Subject: [PATCH net-next 1/3] net: axienet: Propagate registration errors during probe.

The function, axienet_mdio_setup(), calls of_mdiobus_register() which
might return EDEFER_PROBE.  However, this error is not propagated to
the driver's probe method, and so deferred registration cannot happen.
This patch fixes the issue by handling the error code properly.

Signed-off-by: Richard Cochran <richardcochran@...il.com>
---
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index 20746b801959..53644abe52da 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -1835,9 +1835,10 @@ static int axienet_probe(struct platform_device *pdev)
 		}
 
 		ret = axienet_mdio_setup(lp);
-		if (ret)
-			dev_warn(&pdev->dev,
-				 "error registering MDIO bus: %d\n", ret);
+		if (ret) {
+			dev_err(&pdev->dev, "error registering MDIO bus\n");
+			goto free_netdev;
+		}
 	}
 
 	lp->phylink_config.dev = &ndev->dev;
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ