Message ID | 20240504-pinctrl-cleanup-v2-17-26c5f2dc1181@nxp.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show
Return-Path: <SRS0=t1FJ=MH=oss.nxp.com=peng.fan@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E1C73C4345F for <soc@archiver.kernel.org>; Sat, 4 May 2024 13:17:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id D4434C4AF18; Sat, 4 May 2024 13:17:07 +0000 (UTC) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2081.outbound.protection.outlook.com [40.107.22.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 996EAC072AA; Sat, 4 May 2024 13:17:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.kernel.org 996EAC072AA Authentication-Results: smtp.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UlggmPZvqE79ZaeW1gTAbA+cs1kIqi2SIyvOM1HB4159JF/+JtCxmfQiW0ivqdXP5CXkKje/nyrmWH/Yrn/GJo/ayUbcZ+X7nWP9o82PvscO9WYRE33rPFwr6REMQXZZgRmeuzGld47CW5hNOyINSpkGwwt41YY4W+dJkF2OBzO9Jru7wS7dw8RyU47sOrtdJeQefKEOH5Rf01ZmrXjRMuEfr+0BICN4NYt1LACPnQEuj41Jh4qqSfByzmuZ1dMuc1l7qwVm73K3m2oHRU+DAEs8Gi2JKGyam4WkrpLUqSqCD0bxtus6agOBE0cWUaxvdjW+UkG+HtJXUKZx3q8OyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OzFmWqqgAaHNbNJ4y5r21eHdO5OywXD/utfmPqrXP8Q=; b=TgVpot3hegYYv3qbkWnLZxHoF9Lz7u+bMV5C77TdeGnx3Ry6fBW9wp98fjl8BNVSkpfnxfSzk3ETv8W9t2zD/MuPKI01Ilsgqe23L7MPimZ4SNdsBCI/2UAeCuxN6ej1okwS8bXnqP1nsWbmIvxD1AAwBe9FFp/+vFE1GVbmZ7o0jAf+PHqp2by/jQp92NhEoS4xiFsH3W3i6UgEzOCXNB7Bx+Ti9HYrCmDvb++GAKFHiKLqPkGZY6rNJHrWf3p2+OGupUqsfQOQjc1jZs8Th7uhdyRGqBvFpKqcjOU4ReHTJRv2IQUjfDIG5+xEw4EY3//hA5atG4ZS1cixltpUMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OzFmWqqgAaHNbNJ4y5r21eHdO5OywXD/utfmPqrXP8Q=; b=Hujfgk6pBbJGD9Gn7U6zkbL3oeUYDzP9UMdHGvZL/K+xEh+dg1xpaQYo1lBHM8dRZTsMDLDcMg7aDlpeBuyBnsTkrCN9AI7lSKXvaG3RIin2lRLyV/vsqE6L59CW7E1hXxjdoMrKgn3ksp4JBgAQIzBAi4SZ3isnWO3ZQqIciJU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by AM9PR04MB8633.eurprd04.prod.outlook.com (2603:10a6:20b:43c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Sat, 4 May 2024 13:17:04 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d30b:44e7:e78e:662d]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d30b:44e7:e78e:662d%4]) with mapi id 15.20.7544.036; Sat, 4 May 2024 13:17:03 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> Date: Sat, 04 May 2024 21:20:15 +0800 Subject: [PATCH v2 17/20] pinctrl: pinconf-generic: Use scope based of_node_put() cleanups Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240504-pinctrl-cleanup-v2-17-26c5f2dc1181@nxp.com> References: <20240504-pinctrl-cleanup-v2-0-26c5f2dc1181@nxp.com> In-Reply-To: <20240504-pinctrl-cleanup-v2-0-26c5f2dc1181@nxp.com> List-Id: <soc.lore.kernel.org> To: Linus Walleij <linus.walleij@linaro.org>, Thierry Reding <thierry.reding@gmail.com>, Jonathan Hunter <jonathanh@nvidia.com>, Dvorkin Dmitry <dvorkin@tibbo.com>, Wells Lu <wellslutw@gmail.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Emil Renner Berthing <kernel@esmil.dk>, Jianlong Huang <jianlong.huang@starfivetech.com>, Hal Feng <hal.feng@starfivetech.com>, Orson Zhai <orsonzhai@gmail.com>, Baolin Wang <baolin.wang@linux.alibaba.com>, Chunyan Zhang <zhang.lyra@gmail.com>, Viresh Kumar <vireshk@kernel.org>, Shiraz Hashim <shiraz.linux.kernel@gmail.com>, soc@kernel.org, Krzysztof Kozlowski <krzk@kernel.org>, Sylwester Nawrocki <s.nawrocki@samsung.com>, Alim Akhtar <alim.akhtar@samsung.com>, Geert Uytterhoeven <geert+renesas@glider.be>, Patrice Chotard <patrice.chotard@foss.st.com>, Heiko Stuebner <heiko@sntech.de>, Damien Le Moal <dlemoal@kernel.org>, Ludovic Desroches <ludovic.desroches@microchip.com>, Nicolas Ferre <nicolas.ferre@microchip.com>, Alexandre Belloni <alexandre.belloni@bootlin.com>, Claudiu Beznea <claudiu.beznea@tuxon.dev>, Dong Aisheng <aisheng.dong@nxp.com>, Fabio Estevam <festevam@gmail.com>, Shawn Guo <shawnguo@kernel.org>, Jacky Bai <ping.bai@nxp.com>, Pengutronix Kernel Team <kernel@pengutronix.de>, Chester Lin <chester62515@gmail.com>, Matthias Brugger <mbrugger@suse.com>, Ghennadi Procopciuc <ghennadi.procopciuc@oss.nxp.com>, Sean Wang <sean.wang@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Sascha Hauer <s.hauer@pengutronix.de>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, Dan Carpenter <dan.carpenter@linaro.org>, Tony Lindgren <tony@atomide.com>, Stephen Warren <swarren@wwwdotorg.org> Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-samsung-soc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-riscv@lists.infradead.org, linux-mediatek@lists.infradead.org, imx@lists.linux.dev, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, Peng Fan <peng.fan@nxp.com> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714828815; l=1107; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=2wM6S75hkeICu8KMVBGWw7nINzfNCEUbOtGveeJZglQ=; b=W5Ezlhd9RfExH8zWzuKwrmVUyRSF1AbQsCIMFKOLEKa6ZeJmr07/EaJgdP6wSTycJk1QVaR5H zbLbDF4FDjFBbtd58shfrCerWTDLaxNYTJIpazadXEO2mmS4+ShJxp+ X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR06CA0230.apcprd06.prod.outlook.com (2603:1096:4:ac::14) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|AM9PR04MB8633:EE_ X-MS-Office365-Filtering-Correlation-Id: 0c1176af-102a-4e3f-0f53-08dc6c3c7d6a X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|52116005|7416005|376005|1800799015|366007|38350700005|921011; X-Microsoft-Antispam-Message-Info: =?utf-8?q?DdikzDKEmMOr8kCCk+DIhoh4V3Om6JX?= =?utf-8?q?8zvr293WBwCkO5zN3r1R1nguEHpcU2FgRZ69PDpIGhXBU2oQptG+/4fe0P2QEoz25?= =?utf-8?q?JdUjAge0UwjtY776v6TVQJjgPtNspY9TCg5hoGCtPG2EBnVrrUNJk/F2tJaJ5POg4?= =?utf-8?q?7E4BlApYa8eMQhNBCIoEUQFRNZ4qTrCq+QUlceyDW0A0xMg77eOivMWnc4we6mr1y?= =?utf-8?q?JVkAmB1kizxHGhRwIPIsnkGQy34seQQqeV5NxMaPtS0a1FC4DZ2OwET2TgRQQ/tp7?= =?utf-8?q?hUCSJs8h3laOAE9X+P2PDwG4ID2lIn7IUdWxxm077R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zhu7jh84eDnzLU+08N3PpA923pP?= =?utf-8?q?Ayg7X6PtgHUx2odrszIrFXPMaUMOx0cYxRS8jUhSa9HFh7TFxS+vBCJCwQaTLM0d/?= =?utf-8?q?Q9tUXfPADwY+gfIxAskUGekrTbvrNDIe8lMFMn0euljNvOtJCVLh9uYQ=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(52116005)(7416005)(376005)(1800799015)(366007)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ol09Toww7IhsQ8TQz7xB63ohG6rx?= =?utf-8?q?t/0BWWJF6gVo+v/WvXZoYDEnZajxSKG35Ej/HKzZM5pCnpcwxC8o94GB5/0nbIwUN?= =?utf-8?q?NAtzc9w/Qa4ltRoXEN4igcZZnAa5Fk2z7ukveTb6TfGsbx87rT3F1iMcNihfbADdp?= =?utf-8?q?XBBgm+RXdflxczUNhiILg0KOSpeFpnQ11bvKMrq+LnBFjXE+ocO0bRMs2ZJvt+51O?= =?utf-8?q?RwFlhKgCHeHYvj33jIRnDUCQ12GZNP3aZth2QNVSb6GQjDf0ibrhoXHH5w11yi0GM?= =?utf-8?q?xAp6f6DO6rwoePs5Sc8w7BqwoRRGs3OQ3rpTIm2jlJPmOZPBxw+xFgXt3tFohcZWH?= =?utf-8?q?fn4B7W6LUXBLx3ISzMHymPae8jE1Y4FXzpR/sHO8/DyoDlAYhz19XNhSgyCW8pR0+?= =?utf-8?q?zB4/zPh+GK35BI+nEEMk0eCcRIuIVfWoNpzcuFr4pTrxCvGEcRfbzwAWzJMgpj831?= =?utf-8?q?KV7Sk2u6vyWikeE5JIlo6j16ZxMncurxSfEkzvY7pEMof8KIHyn6LXSYMbuSg7Rmk?= =?utf-8?q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lR5a0TYGfJBJkrSGbBLhWfZuGPrpEDrhDjfohonie2GYzdKja/v28sEYLDvSR6rV?= =?utf-8?q?PEGypaurmP5dBNDuyz0e6ICJf8dDnmuRe/ClF0ndV96DbbGSSoRRkpc0BrcBPbGpY?= =?utf-8?q?rGqyMcFmCYKd?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0c1176af-102a-4e3f-0f53-08dc6c3c7d6a X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2024 13:17:03.8642 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: QEgJUaP4zRnl3xuiECIIdwnDgtv8meyTZQoA+0gbgaDOSP2A4ZANHr3rQdpLv48ANaBT0NARX4dl/yrvw7Rd4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8633 |
Series |
pinctrl: Use scope based of_node_put() cleanups
|
expand
|
diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c index 80de389199bd..a499b8af5c1f 100644 --- a/drivers/pinctrl/pinconf-generic.c +++ b/drivers/pinctrl/pinconf-generic.c @@ -382,7 +382,6 @@ int pinconf_generic_dt_node_to_map(struct pinctrl_dev *pctldev, unsigned int *num_maps, enum pinctrl_map_type type) { unsigned int reserved_maps; - struct device_node *np; int ret; reserved_maps = 0; @@ -394,13 +393,11 @@ int pinconf_generic_dt_node_to_map(struct pinctrl_dev *pctldev, if (ret < 0) goto exit; - for_each_available_child_of_node(np_config, np) { + for_each_available_child_of_node_scoped(np_config, np) { ret = pinconf_generic_dt_subnode_to_map(pctldev, np, map, &reserved_maps, num_maps, type); - if (ret < 0) { - of_node_put(np); + if (ret < 0) goto exit; - } } return 0;