[PATCH] net: fsl_fman: gracefully exit of_fixup()
Sascha Hauer
s.hauer at pengutronix.de
Tue Dec 19 05:15:10 PST 2023
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 at 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
More information about the barebox
mailing list