Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34776821rwd; Sun, 9 Jul 2023 20:25:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlGCfiXKZ/SOfZNKwdAcoEEnMG4m+6RNMWDYBlgcU4b6/5oFK/ng8kGjxF+4xBLZrjbOszY/ X-Received: by 2002:a17:906:d9:b0:98e:2413:952f with SMTP id 25-20020a17090600d900b0098e2413952fmr13846981eji.18.1688959511191; Sun, 09 Jul 2023 20:25:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688959511; cv=pass; d=google.com; s=arc-20160816; b=LuHxIuCx/IXz2tKvkH0v1lG0L2/PQ9xi6BsXXdVRRuY19NaH5nBsokNvA5X+2Us+sl pdjr3YYSsvMNpOh4a9MUI25zK6xZARZQkXWq0XxzajxzHs4lerR7GaJCDuwcRtGrSmgU DGM6CDBqP1HAYNwkjFZSXVtmOsLVnL0tdl8u7Gcv6yVV3Ut7Oy8v/C15xceuRGEucWfH XMhj/50m9kXAb5yxj8NpcUlFl7atDgFTCl/pKypcBEscu1aUjFCQX5BoHEYWIuWCV0f5 wgx6QIYVtVTRjOo5ml463PfLao7lo7dE/qtG8V1G9KO0pLwVh4NpNLhoCWGWYDSHmgbR mFVw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=sxa8InV55vWyEERTbPTwvBYLSIN4XvPwJyu9WVea+8I=; fh=MTOdF68rcmVS1R8pkdMq3LVUgNj4c70yx/RPZIabBTg=; b=Ct6mbqe4iTC1+D1+tIge5X3ASL+DyHducD2/03XFhqUG87TRUoEj7wi0IkZVR6bolq qa8mh3Q+E7d+R3s2UAa8FsNcYqmIa9/ligpx7JiKZ2mahhotA6ngDCLdsqEa0tOBwHy8 xzCDW499rS6QE4tikccivp1L6hAJ+4bwgWYK7UnaEWIJUWeD866CbHfX3bHTwiWwWRuP my9A1tKu9U8DbVsp9afU5WS1XbV4dad2QvQKtZ2WXw0E1vsHTU3zL6cDZYYyQ60Awo/a TNb6/rs6NTYVh8sBeLieo68RS1MEeN+Kie8VZY/zWUBLoK7snJG9iz03fjQHrhbjJJg7 1ekw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="KnqM9/Kx"; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a22-20020a170906671600b00992f1b3ce88si8856707ejp.590.2023.07.09.20.24.47; Sun, 09 Jul 2023 20:25:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="KnqM9/Kx"; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229712AbjGJDTU (ORCPT + 99 others); Sun, 9 Jul 2023 23:19:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbjGJDTQ (ORCPT ); Sun, 9 Jul 2023 23:19:16 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2115.outbound.protection.outlook.com [40.107.117.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98445EC; Sun, 9 Jul 2023 20:19:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eZPaHIvcXjPlrIaYHE81xK9/WPDKxUdkKEPcJWs1N0G/XC7x1uGu9JMfNlEGTdb7htWWjR43m+2gHbpIxDPn2XcnSdoI/S/J9oHRISCg6Mdr8Vi9M6l2cp6Nm1TVU5hCb85hJvyHC+3Xg3HXyMRk1vBZn7yXdic3mxEAYAZqFLh8k9BFBCExuNVw8Z2N4ucFKz3zm+w5MaFoM66+carqX42+DD8X2Kd+s4pT/099YpBut/FrKhRTZ2gkbIE/pCG13mahOGYnilUym3IvaK2ke5/yaKlyhhIdeoqA6BzUpSdV9A9ivQYtobuPkHq5xhDMAj9QoG2qKoTunSvwxOMwOw== 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=sxa8InV55vWyEERTbPTwvBYLSIN4XvPwJyu9WVea+8I=; b=D+91F8kS2VDGf9vhtMnFHIXijMXF7dMUzkVCTcFAjhuUFp95jfcciH2F6hpDF4oAbi/+iyPAXQTqC1bpPfX3fKRnPtBoD/0DpHeQQ9EMqPMpEECQ9kRz8DgWyTKcaojs5b28o5ie+jgo14D5FzOmjcgclDNsiq7RHWFAjVfnQkNXoOaDIf3qEke+6saBG9Vfu/b4zru/eKY+d6IUBLku1OKAVYlsWsJzaA0vC0j0DrvuKTHvEgtIbesgYLoV69M29yU+XVGsutC0eXDXtJ9ytp4YhLFl55MTb64Yn3X4zpCnVVoUVgaQCFUsGpg4LI9TmzqD671NkkApeIZM3gPJ5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sxa8InV55vWyEERTbPTwvBYLSIN4XvPwJyu9WVea+8I=; b=KnqM9/Kx3MtVondCermaS4k77tc+XEjUoCYtCmq8VEvdyfrwZBQD6SlS4PoltOrNOo2GImYT17FhN5qPDP2n25Bz6YDbmfTIit3lO+RRxmxhQ+fGExXcec2b85S7PPnVcjPJAeY5BVfrZdd3dowGRUuJ+zXj+tVO3zceIaar7b6vh8WjVDx2l7ZsmZ3NwERZZ1hyiyMclTKG+vkpYBk/OX1ZbzoZ2eB7j7wXuZkerkDzZ3+EErWrQVcGpu5qWWsrXLI43i53GPih/lmAA/iqQYwyQy+YXpDnVr9bBUb3jLEE6B4YDcSmYdiJFwTMI9AdENOk7Vax1tjYSfslDHsKPw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB6697.apcprd06.prod.outlook.com (2603:1096:400:451::6) by TYSPR06MB6606.apcprd06.prod.outlook.com (2603:1096:400:481::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 03:19:11 +0000 Received: from TYZPR06MB6697.apcprd06.prod.outlook.com ([fe80::8586:be41:eaad:7c03]) by TYZPR06MB6697.apcprd06.prod.outlook.com ([fe80::8586:be41:eaad:7c03%7]) with mapi id 15.20.6565.028; Mon, 10 Jul 2023 03:19:11 +0000 From: Lu Hongfei To: Vladimir Oltean , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, luhongfei@vivo.com Subject: [PATCH] net: dsa: Removed unneeded of_node_put in felix_parse_ports_node Date: Mon, 10 Jul 2023 11:18:59 +0800 Message-Id: <20230710031859.36784-1-luhongfei@vivo.com> X-Mailer: git-send-email 2.39.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TYAPR01CA0066.jpnprd01.prod.outlook.com (2603:1096:404:2b::30) To TYZPR06MB6697.apcprd06.prod.outlook.com (2603:1096:400:451::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB6697:EE_|TYSPR06MB6606:EE_ X-MS-Office365-Filtering-Correlation-Id: ba25be94-1963-42e4-8c6b-08db80f46dfa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /1Cdf2b4W0/RKuLmjRjceHP8MZskZwPvOo7S/ZKlnQUFCa/61fk4nk6jd9RhoAhoFFvVsZfWlWf8WhtgE+UbuNJ1/r0l5gw6v3JOGFcC4HXtVt5qzvdfk39z+vM3eYqTAebxZHygbrnKLFa33pMjRzxkD7ABDbo8gQZTmJFokwgsQI5b5emTZ0WZIz0z/7dLCOow4eDNekE/D0W1rjl4Hs7Bb94VK0Pxc1DyVYmSUHHVcwM+vJmFV7V+z87Wfp7C/+1XTnkYiQ93kz73FF/mMS9asb5tv6HCPkbajzoCHN5MiZnVMzEJ+eAUkrlGkE6ulaJC9bJQu+UJ/g6N/tR3gDe/0pSVlZnawP7MDeres+0LsJ3w1WlkhWngPvMWf5TEj766BvQF5yC/ukyRnitBovSlbeOtKV5hxW8aFeNkwFx7McjVnimyGERJMOKS3bm5onUsko9PqghjAWEeMUnp3r2LZE/Lo/LKMplyVvZUFBcsSmxh7b6ydj90RI0Ubfe9xph5Y7gSB7xbp8gon1+bHAJJC002JcOZtPHS5QvbJdndRhY5sliwM3R2WodIaFl0+opOV10OB0U+y5tESSfv9p70SFIZMuYjsuCd1l434g4NBNMbCX9MAkgoYIW28Bir X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR06MB6697.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(136003)(346002)(376002)(39860400002)(366004)(451199021)(86362001)(38350700002)(38100700002)(36756003)(6666004)(6486002)(52116002)(110136005)(921005)(107886003)(1076003)(6506007)(26005)(186003)(6512007)(2616005)(7416002)(5660300002)(316002)(2906002)(66556008)(478600001)(66946007)(8676002)(8936002)(83380400001)(4744005)(4326008)(66476007)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?5aRKIn0KF7UY5lJ4ugK06Mimt/DR6X1KPgsxcequZt6pyIj+X2iMv1NzSAH2?= =?us-ascii?Q?C3OwYn+nqZqVEBuTv35gmUaGVmYJlN9nFtzMaUGQFXr1E9ECA4de2mdSmWfy?= =?us-ascii?Q?EpWKGacAZQ72xRkU8pIjmiBGZXi5LA12cKMu7+F8VXZK1FrsPVxjI1Yf82xj?= =?us-ascii?Q?TSikEmD2xj8BoZaNIJ0O/wrJeiClQmLLj8+hEmVKUdA7Ec5UIZHQ6io6clk4?= =?us-ascii?Q?slatw52nsNvtx9ejiQXRQ8QPi29uju4i6TbYBAnGtq38q8puj6Jvvf0BiLVl?= =?us-ascii?Q?X2LuHv9wbllYtKdofC+Ld8x0tXGA7RqIXasGkttUoerASPLyOH5nQ/F0EWZd?= =?us-ascii?Q?T2eeR8Yb0OIyFRyhszPn48YFCkDCwedbKt+lhNUDZhSQF2vPeAJ3xk+PFCOn?= =?us-ascii?Q?gxXvser8jo4wH9k7lhmyxK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us-ascii?Q?lSYcXqN84zsgvsDOiXqXbW9e5bJLwp8dpqhcaaqSk2nFztTF9m4xmXbG1nXX?= =?us-ascii?Q?aGSeBd/uOtdc8FF9Me/QN6AAJAEfxlLqWL1h5Zjx0mVut6AGjTBACgXXyoJ+?= =?us-ascii?Q?lzs2dCX2GyneLTFclOrwfRqZxskBN5oyiXa66LF0nUw8d7j0ZkH6snSz/M8U?= =?us-ascii?Q?T9SXaXTvKEvS5cWD8IAPvuJLhcqKXZApC2VGiZXv9lhADDXcKA7SxnsIjk/6?= =?us-ascii?Q?U5O38bFjvAYBSRUAtg1MoVFTCQY5wzVVjpY2n1d2?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba25be94-1963-42e4-8c6b-08db80f46dfa X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB6697.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 03:19:11.5612 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: T/GgNjrA17pT3X01kf2xcyq42BGIswKyUHnYomYmBBsrCNlroZZoao0QVot2HjUTDkVUPeY88iKPSHhpWShA2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYSPR06MB6606 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove unnecessary of_node_put from the continue path to prevent child node from being released twice, which could avoid resource leak or other unexpected issues. Signed-off-by: Lu Hongfei --- drivers/net/dsa/ocelot/felix.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c index dee43caee19e..8da46d284e35 100644 --- a/drivers/net/dsa/ocelot/felix.c +++ b/drivers/net/dsa/ocelot/felix.c @@ -1286,7 +1286,6 @@ static int felix_parse_ports_node(struct felix *felix, if (err < 0) { dev_info(dev, "Unsupported PHY mode %s on port %d\n", phy_modes(phy_mode), port); - of_node_put(child); /* Leave port_phy_modes[port] = 0, which is also * PHY_INTERFACE_MODE_NA. This will perform a -- 2.39.0