mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] net: fsl_fman: gracefully exit of_fixup()
Date: Tue, 19 Dec 2023 14:15:10 +0100	[thread overview]
Message-ID: <20231219131510.7106-1-s.hauer@pengutronix.de> (raw)

The fman OF fixup is registered independent of the actual devices, so
do not assume there are any "fsl,fman" compatible nodes in the current
device tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/net/fsl-fman.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/fsl-fman.c b/drivers/net/fsl-fman.c
index ff32fa8fc7..c5fbeeda37 100644
--- a/drivers/net/fsl-fman.c
+++ b/drivers/net/fsl-fman.c
@@ -1348,7 +1348,12 @@ static int fman_of_fixup(struct device_node *root, void *context)
 	struct device_node *child, *child_bb;
 
 	fman_bb = of_find_compatible_node(NULL, NULL, "fsl,fman");
+	if (!fman_bb)
+		return 0;
+
 	fman = of_find_compatible_node(root, NULL, "fsl,fman");
+	if (!fman)
+		return 0;
 
 	/*
 	 * The dts files in the Linux tree have all network interfaces
-- 
2.39.2




                 reply	other threads:[~2023-12-19 13:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20231219131510.7106-1-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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