[PATCH] net: fsl_fman: gracefully exit of_fixup()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux