[PATCH 06/20] pinctrl/rockchip: parse dt only if the fwnode is of node
Jianqun Xu
jay.xu at rock-chips.com
Tue Sep 20 03:30:54 PDT 2022
Check if the fwnode is a of node before parsing dt, otherwise return a
'0' to allow driver to continue.
Signed-off-by: Jianqun Xu <jay.xu at rock-chips.com>
---
drivers/pinctrl/pinctrl-rockchip.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index 42aa3552417a..7b8d3bff9721 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -3038,6 +3038,9 @@ static int rockchip_pinctrl_parse_dt(struct platform_device *pdev,
int ret;
int i;
+ if (!is_of_node(fwnode))
+ return 0;
+
rockchip_pinctrl_child_count(info, np);
dev_dbg(dev, "nfunctions = %d\n", info->nfunctions);
--
2.25.1
More information about the Linux-rockchip
mailing list