From nobody Tue Apr 7 00:42:41 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F6223A6F1D; Tue, 17 Mar 2026 10:38:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773743904; cv=none; b=Q1oEN7QiB6RcsF8I3srWF+sTr2EVbqcdjQJsKdS0h7iuz2Ozl0DbIq+UvQEPVYD5fuDPkVKQFY5zRNmDj7mZ4MYqr0enQwq6XMxJaTBXUKkvPTxegIlSJNKZgwZkHHWZZazYL3bD+EgHJwznpQPEAYKGF2HQfvu2HYJXJaEPnWk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773743904; c=relaxed/simple; bh=T0SRPM6/sTrNxUml9I3UmGm3cDD5/1UB3PFQKW7oWh4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b3xJ2aOVnhHYMujolrEt4pRabtOG30kjU2TVArcncR+q6HuYC72YQ64Gu0LOLXou+N72RJ8WTVy1TKX2TtW2evxUyxM5vKWcwptuniQhroHwh/SeB+g09HK4V0f3CpUGbEPyVlTPfORvFf65tb055XDEfqzhkvF5JD08H+/xhf8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=QD2FTsD1; arc=none smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QD2FTsD1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1773743903; x=1805279903; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=T0SRPM6/sTrNxUml9I3UmGm3cDD5/1UB3PFQKW7oWh4=; b=QD2FTsD1G2zln3aTVYHjQ7Br4pKTHr2BkQuWnHv9H7bEddPpVP7sS2yS 8lD4hevdgpeii7TuliuB4z14XbneELAnh4fsyMDKvAUMXIJaL1aI2VlIO 17N9AKrClEi6L/D9wy6JwZv1k6F3T1B8UYvJZ5M4KZWFU3rw5xuaHL5R7 ss7LxkEM+VZda4B6JEFnppVu1TN9nLX5lWbuFgrYhARMYghJiqXCLMsXR vQZ5VCmWoRPQpH+8Qrm9lMH3W3E9rtN5xBjsnac4wwqgZhdEVnkT4BkUb A/usC6bJcbNcZ0i2imxE67lk97sBK/rZnZFV+fusgQDtSKixxv/AYUJ7c w==; X-CSE-ConnectionGUID: CZP8kqFASsq0xnfLcRO6qw== X-CSE-MsgGUID: Fb8FMCShTyy7zttvxQr5sA== X-IronPort-AV: E=McAfee;i="6800,10657,11731"; a="74889861" X-IronPort-AV: E=Sophos;i="6.23,124,1770624000"; d="scan'208";a="74889861" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2026 03:38:20 -0700 X-CSE-ConnectionGUID: elcTDcIBTxWjQEVRPH+hfQ== X-CSE-MsgGUID: vC+o2wEnTaGgtLYHaFhNSg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,124,1770624000"; d="scan'208";a="245243179" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa002.fm.intel.com with ESMTP; 17 Mar 2026 03:38:19 -0700 Received: by black.igk.intel.com (Postfix, from userid 1003) id 3E53C9B; Tue, 17 Mar 2026 11:38:18 +0100 (CET) From: Andy Shevchenko To: Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1 2/3] pinctrl: pinconf-generic: Validate fwnode instead of device node Date: Tue, 17 Mar 2026 11:36:12 +0100 Message-ID: <20260317103817.1982584-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260317103817.1982584-1-andriy.shevchenko@linux.intel.com> References: <20260317103817.1982584-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Currently we convert device node to fwnode in the pinconf_generic_parse_dt_config() and then validate the device node. This is confusing order. Instead, assign fwnode and validate it. Fixes: e002d162654b ("pinctrl: pinconf-generic: Use only fwnode API in pars= e_dt_cfg()") Signed-off-by: Andy Shevchenko --- drivers/pinctrl/pinconf-generic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-ge= neric.c index d0b825ff52db..0ed57720ae61 100644 --- a/drivers/pinctrl/pinconf-generic.c +++ b/drivers/pinctrl/pinconf-generic.c @@ -377,12 +377,13 @@ int pinconf_generic_parse_dt_config(struct device_nod= e *np, unsigned long **configs, unsigned int *nconfigs) { - struct fwnode_handle *fwnode =3D of_fwnode_handle(np); unsigned long *cfg; unsigned int max_cfg, ncfg =3D 0; + struct fwnode_handle *fwnode; int ret; =20 - if (!np) + fwnode =3D of_fwnode_handle(np); + if (!fwnode) return -EINVAL; =20 /* allocate a temporary array big enough to hold one of each option */ --=20 2.50.1