mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] net: fsl_fman: gracefully exit of_fixup()
@ 2023-12-19 13:15 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2023-12-19 13:15 UTC (permalink / raw)
  To: Barebox List

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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-19 13:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-19 13:15 [PATCH] net: fsl_fman: gracefully exit of_fixup() Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox