Message ID | 20240501-pinctrl-cleanup-v1-1-797ceca46e5c@nxp.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-NXP1-onmicrosoft-com header.b=avzeKvSq; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WnqKc2tYGz1yXf for <incoming@patchwork.ozlabs.org>; Tue, 20 Aug 2024 09:57:56 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4WnqJv4thMz3g4r for <incoming@patchwork.ozlabs.org>; Tue, 20 Aug 2024 09:57:19 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-NXP1-onmicrosoft-com header.b=avzeKvSq; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=permerror (SPF Permanent Error: Void lookup limit of 2 exceeded) smtp.mailfrom=oss.nxp.com (client-ip=2a01:111:f400:fe0c::630; helo=eur04-db3-obe.outbound.protection.outlook.com; envelope-from=peng.fan@oss.nxp.com; receiver=lists.ozlabs.org) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on0630.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0c::630]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VTxhK4ZLkz2xTl; Wed, 1 May 2024 22:48:49 +1000 (AEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jtGqZBS8teDf5x3JRMuyIEblZMUrEOuJmfQMDOrmWCiaMEHwmJx6SDzE2IkbdtpsRjRgUFyGUJ7obl+6lA2ByW6eOwSugT1uD7AzbTBm71claRG/5uPeq5i0/buTwnKGN0mb+ZXRGEAjM5nvYZGGAjMQSX0ecSWZRav6AvayK0rLYQUWTTHuJCdvK74YQmwVjk4TqH9iP2XNFWPW8qa7w/9MqNU2OS4FHif8XqPz8FGfIGD8wZDsir9X/x1DPQLJGKNr2YdCQghJHqAeVXdWrY3NP1Rqj5I5vajmm9QhOS+L/WMCNnjoleW+bUTUSjp4d8DeSkP8piDmFJ8XH7bOMg== 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=CqwszMK70eQVJEA6pKKjpRuI8VkEgByRm8NicNvuM8U=; b=jIF5zYFLfv4k+Ai4BLO+LbHzQhW6gxxMjwhEvjGyAgvljoPw0bzqFq/iiADMHLK4jsJXB8R4uxO8wkPQQnRgAywEDB65StlIBxnXJiaYZ864r28x5VGKD2VOJ4qzksNNGwcRXSS9gr+xbJLJqdSYcbRKmcpdBiDfwo6PXkGvd9jxMkuCD0Hlx8ig9ItEq2ExLbbVqIVWM0ULlWlqQRRSLvfix8dEyUtiaV8HcUHMFFa/yrTCBccbNYXllTqT24TURzkbXh18YCUQXbNkKy9m4JSg2WsVf+pFp/VvUoIoOgba/W8v3faUwG/qapcZNS1VQIoMe9pS1An8x4XWKVYPgQ== 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=CqwszMK70eQVJEA6pKKjpRuI8VkEgByRm8NicNvuM8U=; b=avzeKvSq4PewiI3jQVyUnNS8LbfkC+8WIhgG86jlQtI2C/xzP1qJwY8L2eqsK9cpfGKPicUA9/z0h6CY2VjQBPf10WP2AOYPRK855LWPn1ckp+OETvELl7E7KSKM0eGTCleUahuTQnaYodX6rkPbMm6ET+i9ZnqvwhihZFQdF3Y= 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 DB9PR04MB9284.eurprd04.prod.outlook.com (2603:10a6:10:36c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.36; Wed, 1 May 2024 12:48:39 +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.7519.031; Wed, 1 May 2024 12:48:38 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> Date: Wed, 01 May 2024 20:55:59 +0800 Subject: [PATCH 01/21] pinctrl: ti: iodelay: Use scope based of_node_put() cleanups Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240501-pinctrl-cleanup-v1-1-797ceca46e5c@nxp.com> References: <20240501-pinctrl-cleanup-v1-0-797ceca46e5c@nxp.com> In-Reply-To: <20240501-pinctrl-cleanup-v1-0-797ceca46e5c@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> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714568179; l=2618; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=pkkGggwje14Z0jtlI2/3mY9oSznaGYtjsjUTP2Epebs=; b=8nSRZH4j9ElQUUnrxRoZB0IvYaXm+wYHSYfUTORvK0TtdfiFHDiT/ysKV1+rzrNSC18t/cZBF RPqvUMxjmGSC+wCW1TMY2LOwrVvVWQ57ebWbTQL39dBLQuE2mlMTYN7 X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR02CA0064.apcprd02.prod.outlook.com (2603:1096:4:54::28) 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_|DB9PR04MB9284:EE_ X-MS-Office365-Filtering-Correlation-Id: e10ed49f-d70e-4910-e729-08dc69dd05b4 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|1800799015|376005|52116005|7416005|366007|38350700005|921011; X-Microsoft-Antispam-Message-Info: =?utf-8?q?tZnrQ8Qrl4+9OrOWudSuOkWa0QwIxmn?= =?utf-8?q?8fVnWWsns5pJT35jIlJafpq/x7Oqkq9WjHs+MadS9O5xZ659BoV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NbKiXy?= =?utf-8?q?LYpTxEYbi7DLoco0xbcj24tIQ7Jg22utTtbWpl+7exdm8PlVCdlgyPVbZ5BddVuU4?= =?utf-8?q?/61kvZCsdXQRwoLXUlNn0eiqxQ45RqSnseo38etWxdXrQNY2cHvRgmh41yCUmWn4k?= =?utf-8?q?VSVrydhWXAV6tocgz9iryL/NRzeCTIBKRyccPidhmailfJaesivT0p2CaLkRTGwfs?= =?utf-8?q?nB0cGajncj0f5I07gx/ROJ4qEzbfpU0X0x+VJzRsWxNq+L2XVsE6tmkzdjf5QDk3d?= =?utf-8?q?e8eJ3ti/ezZbmYnjd8bqqB8yLlVYKJtMSNVBeOfE5NMSsUF9mIXB4NkwuLMEx14Kc?= =?utf-8?q?wsNtCQvWUUX23JKxnLhO+5P0s4wq9qrrLyEw2U8Jxxhqd7UykdzmOJGU=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)(1800799015)(376005)(52116005)(7416005)(366007)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?pgA33c0kX2IoJZDaLLDEkVUVD+kH?= =?utf-8?q?KZ7QBDkDtJfaIaJx2P2Xy3iD+sQvR21i/paUhwfokimF2RKXHVYV7Cw3sXOz3Lha8?= =?utf-8?q?TyoVqevCDTTQ7QxstJWsrdwK/Vq15OnF1UsJzuDePrXIRR+qTcxVKXaWAHKMDuXPj?= =?utf-8?q?yE4mml8xqIZZxHlbF+sniPH5Yjgty76txqjqwK9f2Ys7d0Z453qHfS2c7Qd4V4tJ9?= =?utf-8?q?2UIagIec3PgzX2ATRCZviZSVhSBQ7ZeR9dJHV8pipS8KLGbSTdqze95r1RzNWNm8h?= =?utf-8?q?XYK2hnxWwuwABWo6qUXF4+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FdAyNGs/J22BxrpAl6zRdd9nI5z?= =?utf-8?q?yNqpCu2yzBcryRxWKik1Jl8d+avHP+bDGglOF2X+h2PVlRhMx2Nq7SsUvoWme1gt2?= =?utf-8?q?hEOcvO5kufvXTxd7+X9MnFX2+E7l6cTAOT9sgMI7L5SLKCsw7wrcXacyijAylS8k4?= =?utf-8?q?A/WvFHmGOnOEL9E+s7/kJNN7eB0FJJVmoawVd5m1qs5XZsVhTcP9eJePn7uSjxKEh?= =?utf-8?q?QwBnEox4zbH4lKXSMsRUGsTFUJ+7S6mK6SXBzBOCFiAVallvr4+ZK8A6K/Drz7cas?= =?utf-8?q?3KskeoKQ+ftQB8DSTFzlVNXa3BRDD7Xo7DIlSHUn0P9JfUbIyAOBdT+WLBIANIHa6?= =?utf-8?q?Wnmm4bUb6exE?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e10ed49f-d70e-4910-e729-08dc69dd05b4 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 May 2024 12:48:38.6333 (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: MwPttC3uQZkaHlw2TbVQNdOen4gRwAJVis6AnSuWi9l3s9tg3ZEut0bJPfwIMBQ0BaFcpI3O3vG3HMTcJVR7yw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9284 X-Mailman-Approved-At: Tue, 20 Aug 2024 09:56:01 +1000 X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux ASPEED SoC development <linux-aspeed.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/linux-aspeed>, <mailto:linux-aspeed-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/linux-aspeed/> List-Post: <mailto:linux-aspeed@lists.ozlabs.org> List-Help: <mailto:linux-aspeed-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/linux-aspeed>, <mailto:linux-aspeed-request@lists.ozlabs.org?subject=subscribe> Cc: imx@lists.linux.dev, Peng Fan <peng.fan@nxp.com>, linux-samsung-soc@vger.kernel.org, linux-aspeed@lists.ozlabs.org, linux-rockchip@lists.infradead.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, linux-riscv@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" <linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> |
Series |
pinctrl: Use scope based of_node_put() cleanups
|
expand
|
diff --git a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c index 040f2c46a868..1032bc9c36aa 100644 --- a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c +++ b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c @@ -822,53 +822,48 @@ MODULE_DEVICE_TABLE(of, ti_iodelay_of_match); static int ti_iodelay_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct device_node *np = of_node_get(dev->of_node); + struct device_node *np __free(device_node) = of_node_get(dev->of_node); struct resource *res; struct ti_iodelay_device *iod; - int ret = 0; + int ret; if (!np) { - ret = -EINVAL; dev_err(dev, "No OF node\n"); - goto exit_out; + return -EINVAL; } iod = devm_kzalloc(dev, sizeof(*iod), GFP_KERNEL); - if (!iod) { - ret = -ENOMEM; - goto exit_out; - } + if (!iod) + return -ENOMEM; + iod->dev = dev; iod->reg_data = device_get_match_data(dev); if (!iod->reg_data) { - ret = -EINVAL; dev_err(dev, "No DATA match\n"); - goto exit_out; + return -EINVAL; } /* So far We can assume there is only 1 bank of registers */ iod->reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); - if (IS_ERR(iod->reg_base)) { - ret = PTR_ERR(iod->reg_base); - goto exit_out; - } + if (IS_ERR(iod->reg_base)) + return PTR_ERR(iod->reg_base); + iod->phys_base = res->start; iod->regmap = devm_regmap_init_mmio(dev, iod->reg_base, iod->reg_data->regmap_config); if (IS_ERR(iod->regmap)) { dev_err(dev, "Regmap MMIO init failed.\n"); - ret = PTR_ERR(iod->regmap); - goto exit_out; + return PTR_ERR(iod->regmap); } ret = ti_iodelay_pinconf_init_dev(iod); if (ret) - goto exit_out; + return ret; ret = ti_iodelay_alloc_pins(dev, iod, res->start); if (ret) - goto exit_out; + return ret; iod->desc.pctlops = &ti_iodelay_pinctrl_ops; /* no pinmux ops - we are pinconf */ @@ -879,16 +874,12 @@ static int ti_iodelay_probe(struct platform_device *pdev) ret = pinctrl_register_and_init(&iod->desc, dev, iod, &iod->pctl); if (ret) { dev_err(dev, "Failed to register pinctrl\n"); - goto exit_out; + return ret; } platform_set_drvdata(pdev, iod); return pinctrl_enable(iod->pctl); - -exit_out: - of_node_put(np); - return ret; } /**