From nobody Thu Apr 2 22:57:41 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FD45ECAAD8 for ; Tue, 20 Sep 2022 10:31:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230442AbiITKbm (ORCPT ); Tue, 20 Sep 2022 06:31:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230458AbiITKbT (ORCPT ); Tue, 20 Sep 2022 06:31:19 -0400 Received: from mail-m11875.qiye.163.com (mail-m11875.qiye.163.com [115.236.118.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E35F6E2C2 for ; Tue, 20 Sep 2022 03:31:16 -0700 (PDT) Received: from localhost.localdomain (unknown [58.22.7.114]) by mail-m11875.qiye.163.com (Hmail) with ESMTPA id 5B7DA280B9C; Tue, 20 Sep 2022 18:31:14 +0800 (CST) From: Jianqun Xu To: linus.walleij@linaro.org, heiko@sntech.de, brgl@bgdev.pl, andriy.shevchenko@linux.intel.com Cc: robert.moore@intel.com, robh@kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, lenb@kernel.org, rafael@kernel.org, Jianqun Xu Subject: [PATCH 06/20] pinctrl/rockchip: parse dt only if the fwnode is of node Date: Tue, 20 Sep 2022 18:30:54 +0800 Message-Id: <20220920103108.23074-7-jay.xu@rock-chips.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220920103108.23074-1-jay.xu@rock-chips.com> References: <20220920103108.23074-1-jay.xu@rock-chips.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFJSktLSjdXWS1ZQUlXWQ8JGhUIEh9ZQVlCGhhKVkhNGkhJHkgeSENDSVUTARMWGhIXJB QOD1lXWRgSC1lBWU5DVUlJVUxVSkpPWVdZFhoPEhUdFFlBWU9LSFVKSktISkNVSktLVUtZBg++ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6OQg6OCo4Sj0YKhwtLQowLxpP LjBPCw9VSlVKTU1ITU1CQ0xOS0tLVTMWGhIXVREaAlUDDjsJFBgQVhgTEgsIVRgUFkVZV1kSC1lB WU5DVUlJVUxVSkpPWVdZCAFZQUlLSEs3Bg++ X-HM-Tid: 0a835a73afbf2eb1kusn5b7da280b9c Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 --- drivers/pinctrl/pinctrl-rockchip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-r= ockchip.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; =20 + if (!is_of_node(fwnode)) + return 0; + rockchip_pinctrl_child_count(info, np); =20 dev_dbg(dev, "nfunctions =3D %d\n", info->nfunctions); --=20 2.25.1