From: Richard Cochran <richardcochran@gmail.com>
To: netdev@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
David Miller <davem@davemloft.net>,
Michal Simek <michal.simek@xilinx.com>,
Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Subject: [PATCH net-next 1/3] net: axienet: Propagate registration errors during probe.
Date: Mon, 16 Dec 2019 10:32:54 -0800 [thread overview]
Message-ID: <42ed0fb7ef99101d6fd8b799bccb6e2d746939c2.1576520432.git.richardcochran@gmail.com> (raw)
In-Reply-To: <cover.1576520432.git.richardcochran@gmail.com>
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@gmail.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
next prev parent reply other threads:[~2019-12-16 18:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-16 18:32 [PATCH net-next 0/3] net: axienet: Fix random driver issues Richard Cochran
2019-12-16 18:32 ` Richard Cochran [this message]
2019-12-17 6:19 ` [PATCH net-next 1/3] net: axienet: Propagate registration errors during probe Radhey Shyam Pandey
2019-12-17 15:49 ` Richard Cochran
2019-12-19 18:13 ` Radhey Shyam Pandey
2019-12-20 5:19 ` Richard Cochran
2019-12-20 5:51 ` Radhey Shyam Pandey
2019-12-16 18:32 ` [PATCH net-next 2/3] net: axienet: Support software transmit time stamping Richard Cochran
2019-12-16 18:32 ` [PATCH net-next 3/3] net: axienet: Pass ioctls to the phy Richard Cochran
2019-12-17 6:43 ` Radhey Shyam Pandey
2019-12-17 10:59 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42ed0fb7ef99101d6fd8b799bccb6e2d746939c2.1576520432.git.richardcochran@gmail.com \
--to=richardcochran@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=michal.simek@xilinx.com \
--cc=netdev@vger.kernel.org \
--cc=radhey.shyam.pandey@xilinx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).