diff mbox series

[06/20] pinctrl/rockchip: parse dt only if the fwnode is of node

Message ID 20220920103108.23074-7-jay.xu@rock-chips.com (mailing list archive)
State New, archived
Headers show
Series Rockchip pinctrl/GPIO support ACPI | expand

Commit Message

Jianqun Xu Sept. 20, 2022, 10:30 a.m. UTC
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@rock-chips.com>
---
 drivers/pinctrl/pinctrl-rockchip.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

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);