Message ID | 20240504-pinctrl-cleanup-v2-2-26c5f2dc1181@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 5EF1EC10F1A for <linux-mediatek@archiver.kernel.org>; Sat, 4 May 2024 13:13:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9XH/O68wWJ/FfHgYL+Kkys96wwEpB5Ik6VZZUTwb4Mw=; b=gY5sPO7pgnNq50JDE+8iSDqN5a p7Pythyg4qN8tT80Pu+bwDqNVFooCTfDu7j7VCgv5gthmTJfTp6I1p/UjGwxqiAyvHNIFhBL9KXVc fH27neeXw2zAb+dHM5sKC1hT5cyuS+XGIe6Jw3gRGQdLqwInISGdG+UhrCVXueCUfW/GgGsIbClDm XYxNtHBO8Yip2OBrobJzchMbAyncBs/LwZ05bcrE7pX/fLp96lH4SK5ExuPKhcSWrzOB67ASjQ3Pe hIGMWEuZ41hPudm2IiM+MGGYBC0Cq5T27rC6itIXzwXI4bczUzgCJH5LCeeXwWGdR1JzAhv6qnHsA 2BmP9CSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3FCM-000000025ON-01bg; Sat, 04 May 2024 13:13:06 +0000 Received: from mail-db5eur02on20601.outbound.protection.outlook.com ([2a01:111:f403:2608::601] helo=EUR02-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3FCG-000000025LI-1Yxr; Sat, 04 May 2024 13:13:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PsBZCp9Q2DoZaI+7hZlpN4AV3qyDi6yk7j7xxI7aGPT+2QAuqBU8BWUZRtyjv5ta58Tjp0X17Pj4FUsFIUhwx6616LxpbEML5R1Ge0fKCdWbw8EiidXONIprB2Xp01fjzqw20PD/0PwOIvndEJM96+EMEmTohkJ1lWum4EBeydMmKGozTV4yYBXpD5+8N9JKmqqkt7bbmuA0ZA5si/2/imZivs5R8QM/eyZf5o/7FJahC7Ymfg5h8X6hAcOHR7+YWkS0MBYx2zi0C9eorle4yqBpsSs8nmrYHAVjEjwPJmNjk5roVvDrL6UfzL/+YfLoASCQ4gI7MUA8tV55yPaq8g== 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=9XH/O68wWJ/FfHgYL+Kkys96wwEpB5Ik6VZZUTwb4Mw=; b=TWncYo9doring7vInD062OrPa8mLEYYPnQHCKdGMbQ4nwgay/lYItCeIzbuggHKlNeECzTvi9foYcxGeNknjR9IKymosX2iGWN8xXy73U3+Vu9K3QAQiGswibNii9Q+Nl4hSw08IndO6k0s9Op6HkrTJGjGDRKJQ+kZyhkic4EtI1aecDrvzQqv0Fb4bjZNBMkaGuyfL7i+MInmsqksnhJ3OvHNDCCSWhMVtfLv0/T5HM7BX5LNVZ+2yeTLknS21cBk39N0cqWvodUUDth9uBOxs+94yeIjQDuL8vdtdoGxjSDbkekeqyB4bs6/uNcq6ToVOHx3LjaWqiIvORVZd3A== 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=9XH/O68wWJ/FfHgYL+Kkys96wwEpB5Ik6VZZUTwb4Mw=; b=V349u3hIj3jx8cbwqgkcfFeYcAviXPW4lFmxDNc1jpRnCj3N2UqV3+1FNPMZisxIMljtshFftZvf9/CqPZF/gwdakXv3n++Lu4Sy9MydaP1a/VvfeQHrAQFT2+jWoV4WSZYvwvdlm+9h7N/D5atkTpy3EcMi0t+yX1XnvLDWNo8= 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 PAXPR04MB8174.eurprd04.prod.outlook.com (2603:10a6:102:1c4::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.39; Sat, 4 May 2024 13:12:52 +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:12:52 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> Date: Sat, 04 May 2024 21:20:00 +0800 Subject: [PATCH v2 02/20] pinctrl: tegra: Use scope based of_node_put() cleanups Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240504-pinctrl-cleanup-v2-2-26c5f2dc1181@nxp.com> References: <20240504-pinctrl-cleanup-v2-0-26c5f2dc1181@nxp.com> In-Reply-To: <20240504-pinctrl-cleanup-v2-0-26c5f2dc1181@nxp.com> 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=1919; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=dgr9gEpDJDvikxHa9ZakH2O4ug/ULsl0qx1MCE8QJXg=; b=c29ur0xozBQHWw4UNa1DPvMPB/3nv84hzDNq2CwMxaS5GG6IYyoT0/JK1IrVkkQRteonbSNKJ JhK2UeiCgPTAeUzI40ur2LqqsCNKyNGdObHFdFgxDDw3tA05J72cW0s 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_|PAXPR04MB8174:EE_ X-MS-Office365-Filtering-Correlation-Id: 567fafd5-b163-4390-58c8-08dc6c3be7cc 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|376005|7416005|52116005|1800799015|366007|921011|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?yaBaAp0n/XaiCLVmNLKTzI47WLUIhnH?= =?utf-8?q?82QFvY4TwOsj8ejsIkl2uv8IlJjlK37Azd8ku+dn+YVbbKQfcC4CA77pA4YhgdxWO?= =?utf-8?q?tq/hdOuek4hBy0yupbJ/5rony8uB3hbpHUVLgSMGODjknbfBQYrMQHdOvUIFHKAjP?= =?utf-8?q?oi0fuM9M3IuJDwRnDfGpUWVZkA/dt4zFwcgdFZZObZ5mkIm/TxzHo55iuusoCxNU5?= =?utf-8?q?B7c8OIUVot/SPjWKzDPuOjg1Vy++0j9I+zZb1GGgE2UZuLaj+q1u5Onv94V7Zt+kq?= =?utf-8?q?VYaaOYcMkpnLmFqCzrN85R8KG5h0RCjXf0wXlSYod9wjM1VvDWUu/40vrBaq7hpKr?= =?utf-8?q?zgCL+J0hP21Dr/kRpGIX6zFWOg7HrqzTzWqMg4OVo1bXYHpneZWNWw/Zj0A3Z1YaV?= =?utf-8?q?rwoOLX/WTbm+kBNG1P4GM0i0FUw64t1k5OFs1QLNEgrcNk9zNMmXUTnvIf4pBm5j1?= =?utf-8?q?JfeP0LyDHP828SRrBHNj633QwXcHqCUfKoiv//syVWxRqSRH+n0qwtyCalFn7tHh/?= =?utf-8?q?1E1ggXpsNfVMhCBgPgZ1JLwlMSsjpY9CBxaBUYRWkL+T7h4XaAr0kWOPSO5RNQPy0?= =?utf-8?q?8hrTcNCrcDorvOMu9fxlf3ceZjR/I73m/JEpXXZsjUmF5FPlHqGOvYMCYKhuJ1rq/?= =?utf-8?q?73vEOh5wwGCUzF1eSDSCOgw+kTPcXRJEfDIw0e8e3og1kiBQUIHSYqjv0qbvF8zXw?= =?utf-8?q?2t261N1BF0sqhU558giIyatv7rwh0h/3SqbiCeGSb6r7qm1WHb8sjuYf80SWKF59+?= =?utf-8?q?2XVnAFLZpn2N0dExtHrkkJt3MFgJV2qmgF1jE/6VgNCSM+AVMPm46lNlkNvU/2QSP?= =?utf-8?q?C8QtO/2ZiTqrdaJFChGPPY0/O1i9rjG+18eeccKLmEAVnV/edaclceYZiVNNu6QRb?= =?utf-8?q?Me3y+5bnO1/uymWjn5XWfLnyosD762FYZXAH9PuvKjadCLVs4PBhfBky2ocWdJD0W?= =?utf-8?q?jLyOKlw8My+pbJuqxtqBmOvmRxdSy7lRJi0XGQ1a2oojmAybLkfM8DoXpEa93x5Nk?= =?utf-8?q?cksL+39v5NY47EZKQKwHXs6zosZtBu8++YSzWNG8SqkKOZWu8Igv8hk5zrkVVKLS6?= =?utf-8?q?9GmPStSO41AdU5Pg3C2/4ietsIeyTehl9YJujQbJ7TX+eskfFX+g/vHB94S+E58RE?= =?utf-8?q?eisqeL+xZsoJXXFWe90IBnDEUZoLgv9eLALn8+rY1VE6TCwj03Sne8bSo+Mrku37m?= =?utf-8?q?aWT5HUvB37YOd37UzmzgLtbUwTWj+vCcx2h+YoyeetGQF0ozP0bm8hJyveBSvupVr?= =?utf-8?q?4C3c8O0jpOhqK3yiHSwJz9zlJ2KTyW+xF7/VV/sgvG4n/64eu/1Yot4I=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)(376005)(7416005)(52116005)(1800799015)(366007)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?kXuL4T/o0DiUaqT0OjhdOr8767Ig?= =?utf-8?q?MHS4D+c6Mlb+5Q3IBb0CRzPLJ762GdfmUOXnIMBAG297n6WWKA2vOpC3cjHq13CIg?= =?utf-8?q?7fl0mNqsKf4re9ei9eRfUQPTbsG7pP7dBg2fhogXee72OvckcabwCwK4PYLKHefLB?= =?utf-8?q?BSay6keQTPRqw0oA1ap8GwM6djgVanJ2ZNz0SieHFKbXWtvzBAX1ghFAogbeIosPm?= =?utf-8?q?3hJRyvRIFRkRRuRK/XwIniHyKpHh42ymITZIl/eKe9rAJ2TNOgzOMRzU0xpGyvcFs?= =?utf-8?q?MgTuj7sEwnvYZfgQZz2ZQo0L3d5ng8jGPmmQGpLMcNCCvYmwiRBuy+TA8jQ652asK?= =?utf-8?q?6+6BGvQYMlqz/JOxz6COhvl7LmP5gQvDIUGbPAY7KJDGisvhccVIbvKurItNDBd3i?= =?utf-8?q?xf5iDZJu29QWB56BVpjZ0DlFYoPmjKAqzT1kL5lMqgdoxt5iHKESca1G8wKRtvfoL?= =?utf-8?q?l8qxKTUTkVu9nvUEEMxClmO41iTuVhgf48qpEyYTwiEKNj1mpmGWkQQpQaZFEbaWD?= =?utf-8?q?86boALHOmxrJFVJl/oxFuLFCAs/D9YZ5LEBNez9M/5RXFRRBgPa0DqLwZNL+/fReU?= =?utf-8?q?HhnIq6AQiJzczVq4KOBwcWhp56ZneqVhBiv8X/k4tqgt5OezjpwTHbkX+GTUkpWhH?= =?utf-8?q?2NwQKuKK+OO9L2CVf34WsZeBn77pXSjTcBqBskgPIuNUKxj76YFBO0WohEssgWgXj?= =?utf-8?q?S+1g7yBSnYycW2r1zUTVCeO094zxsym4sOb09ac2zjs3ELBlajkG0tfkrNBnxC0sx?= =?utf-8?q?xh/ZAG4yazE6d6KgmUnG2PgVAdlFAPnsH0sWRW+8Xwch/XFHIW1HmFgwbczc/GCLT?= =?utf-8?q?0SJ6H1lPnTR3HndbCdt6C3IAEkaQgsF9x4sqKu7tUHDUiAFyESXxcT6SrLoTpN1tD?= =?utf-8?q?iSExRo7UwnIoxeqAASkk6nUGFd5Y8JMn4XrwDH+2VObHhSyyzT0TpbeA6oofRDJ/s?= =?utf-8?q?BueaS0JRJMttvJJatW5IVQEzJK1TVj5ZbJatxN9e61sAhMO/wptgGAPJwUSLJL7FE?= =?utf-8?q?qeQXH+XBz3RPnUCvV57oq+82zQnYxe+cJtO0jwQK/Ut6YToLKPUYtNFTr8Nf1DoSh?= =?utf-8?q?0ZeJHrccq/RGA08BAcou2gQUwFGrNlJt9RMjqrK3lfxZiW8ldBxGhiUW2oTlcknSa?= =?utf-8?q?EC+/7VHq9HxOLVAIT4/qu+J1hsRl9+ykyensXxbdiDKsaGkaMembbZaer16kyTzYN?= =?utf-8?q?QEHDFgv87+dVnZCMBHYhLB9LmKXYGHPMuvkI3f9JUkKQHJF1f1tbUwQD2Ce5s4TH7?= =?utf-8?q?Bg8Bv17NCvQsz3mC2hBcVc7kSszS/o8kKSGDpbffcKeRgbE77YpBVpu1w1Ayahzks?= =?utf-8?q?rdday7qOSpju55nXlHwb2Gnu6aqmHUS2RumB+Hzs8nfKg6E02nxbSF4qlcjUElnVv?= =?utf-8?q?zr4R2AJlogiMGGEbQIe24w6lVVoU1O5AVErhaEeCSRFbsHDU6qH5/79DogbrY7sKY?= =?utf-8?q?KvVhH+bAM7dNqasFycZxmK7JKA0vfwUHvE+BY4SxedEbzCbiiQ18yHAQlzlKBuX+y?= =?utf-8?q?VMuGIUrVeoC+?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 567fafd5-b163-4390-58c8-08dc6c3be7cc 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:12:52.8610 (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: 4sy0/+akhGM1b/xMzo7AidLZmxf7iqXZJ2mOFSl12FWS2ISjCqiAQ+I1mwlX0irAQsix20v/1FTiNUyCDxWpQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8174 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240504_061300_618057_A7361267 X-CRM114-Status: GOOD ( 12.49 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-mediatek.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mediatek>, <mailto:linux-mediatek-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mediatek/> List-Post: <mailto:linux-mediatek@lists.infradead.org> List-Help: <mailto:linux-mediatek-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mediatek>, <mailto:linux-mediatek-request@lists.infradead.org?subject=subscribe> Sender: "Linux-mediatek" <linux-mediatek-bounces@lists.infradead.org> Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org |
Series |
pinctrl: Use scope based of_node_put() cleanups
|
expand
|
On Sat May 4, 2024 at 3:20 PM CEST, Peng Fan (OSS) wrote: > From: Peng Fan <peng.fan@nxp.com> > > Use scope based of_node_put() cleanup to simplify code. > > Signed-off-by: Peng Fan <peng.fan@nxp.com> > --- > drivers/pinctrl/tegra/pinctrl-tegra-xusb.c | 7 ++----- > drivers/pinctrl/tegra/pinctrl-tegra.c | 4 +--- > 2 files changed, 3 insertions(+), 8 deletions(-) Looks good to me: Acked-by: Thierry Reding <treding@nvidia.com>
diff --git a/drivers/pinctrl/tegra/pinctrl-tegra-xusb.c b/drivers/pinctrl/tegra/pinctrl-tegra-xusb.c index 96ef57a7d385..49c5edeba87f 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra-xusb.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra-xusb.c @@ -238,20 +238,17 @@ static int tegra_xusb_padctl_dt_node_to_map(struct pinctrl_dev *pinctrl, { struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl); unsigned int reserved_maps = 0; - struct device_node *np; int err; *num_maps = 0; *maps = NULL; - for_each_child_of_node(parent, np) { + for_each_child_of_node_scoped(parent, np) { err = tegra_xusb_padctl_parse_subnode(padctl, np, maps, &reserved_maps, num_maps); - if (err < 0) { - of_node_put(np); + if (err < 0) return err; - } } return 0; diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.c b/drivers/pinctrl/tegra/pinctrl-tegra.c index ccfa3870a67d..c83e5a65e680 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra.c @@ -188,20 +188,18 @@ static int tegra_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev, unsigned *num_maps) { unsigned reserved_maps; - struct device_node *np; int ret; reserved_maps = 0; *map = NULL; *num_maps = 0; - for_each_child_of_node(np_config, np) { + for_each_child_of_node_scoped(np_config, np) { ret = tegra_pinctrl_dt_subnode_to_map(pctldev, np, map, &reserved_maps, num_maps); if (ret < 0) { pinctrl_utils_free_map(pctldev, *map, *num_maps); - of_node_put(np); return ret; } }