Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35212833rwd; Mon, 10 Jul 2023 04:25:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlFK+hwEKj8il9n8TeocSSsdnWZJHOdn2/N3n8LJEoXeZwK1iRHvJ90cBeNYJQaOuSPI32mS X-Received: by 2002:a05:6808:df3:b0:398:2f92:65ca with SMTP id g51-20020a0568080df300b003982f9265camr11464017oic.7.1688988319880; Mon, 10 Jul 2023 04:25:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688988319; cv=pass; d=google.com; s=arc-20160816; b=vHLxTLRhUF9HPZHUsT2XVNihptN87sVNoT92D9O5tV5aVLaIKvVpzOZzsfd9qQ2GLZ r+yFw/CK5GCjKc2KIELXSROJ+oLC8VC13YhLg2U36LdumTnmROHopkU36xu55+DtsLDy dgJwaT+YVkEvNiygB92lAlKLM/486RsbeE43t2fP64tU1tfukMELwcZ0XzLuaqGDJnTJ IX0o7Tv1b9/3se5lHQ6WFDuUyOnHN3DzVfNwERkx17CsDhqJkx+1PRUPV9bbAfW1ncZw 0Q1DhSpFOOGbsYO5Cw6xz4I8WNfPEPKEtHI9BjrvZXJ6UlbuNsEsnY7tIGXGQ3th1s8g 5Epw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=KLW/aCaaiccvEzIyurULonPQUuoBrda8v2prmrkGY98=; fh=KAiJ2gi4Eb4VjIzNZ4gLh3Lys/k0cGgiT73U8PkDiqU=; b=1IiD/cMQ8iWTQi0qR6erl8SE45fVNArsF1wnEtrFPK5uDr5C4Fse1doF5rbJXdAJbA zFvgd50ZIMP7lxCOEQeQvItFq83XB8AMFbyaX0uVlMWJWUKy1ltn3ipiKuqciD/KUDeP ze8qJDlU248Pyu5lULwwEM3clf/gNL0xbTpoR0GsV0S+9uYpaRuachzrJtrHMUZ2gY+8 T9h9z01S1l5I7gzGWFHmbpIWFwTMHm+hESVWOpNq6hK3OU5kRe0FO42QYvObKLOjMijR A3whjeTInhYnzWCEMQHiMynkwB3Ai9SN5ZQJYQ1g7ujT5uBrYQlBJ+zFlMD6z7S7Ujuc s4Dw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=GnCXJiQz; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r21-20020a632055000000b005579890497fsi8770552pgm.205.2023.07.10.04.25.07; Mon, 10 Jul 2023 04:25:19 -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=@nxp.com header.s=selector2 header.b=GnCXJiQz; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229845AbjGJK6p (ORCPT + 99 others); Mon, 10 Jul 2023 06:58:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbjGJK6n (ORCPT ); Mon, 10 Jul 2023 06:58:43 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2046.outbound.protection.outlook.com [40.107.20.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 288AFBA; Mon, 10 Jul 2023 03:58:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RbKLyRb85lFAgkurxZK47UuGJMgrpuAmhrchv8pCQvblHfUCLRUdUMG1WwXebLCdbBU6RhgCIT8DmmK+/PWJkHYqE98N5EfT0E3PZd9jBQ0lsbffvP4ibDzaXJL0hQ5zpldZickWnwunEcM54r5CgHmUwBeaajqjd2YZzoS+flASJOf3WPqv0yn+MJSbsCd0VL9gaGd0WR1LqfxFxmyvGaVnEb0s9n/34xoOpo7f9d1SMoqWyxu0wUtCxZQzDvaOw9M/2s1hUYhBM3C8JI7xp5I0kaDJhXxsy2wopP1NE5CIeEy+e3bo7gz+pCcRc8a+3FZqJBRykDShruW/neWUNw== 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=KLW/aCaaiccvEzIyurULonPQUuoBrda8v2prmrkGY98=; b=c7kRqKTnl6dvVWA6ez40hjnswlVe7W8RgEBXYXNxqEQwmCZ2yetoleehVzbyBH/ivByoLmR4hwGHF/gcKquKf7nZOIc4FlmuHBmPMp5fq9eHaX3N4F1mYAi9Cs+R0eJD+Lzy5+r3WHeDnzFK1kS2Ac1bg3HGWOdnIdweLJ2pSb6OB7JhoUvaYYXCSKU/ep0Gn5nSmoDznAUufWkSpr/VfRUuTyf0z4Bfs+d3TEh9LbzogSDvhB5jTJlqD5vBhpuw3qqq+fRyPb7MZh/wv+olQi9kmD/gknIwzbL+X3YrvZAG+C/S/IIyVIBqKN2YMp/hqHzg/94wyPy0j/h2jNw1Bw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KLW/aCaaiccvEzIyurULonPQUuoBrda8v2prmrkGY98=; b=GnCXJiQzeHsrgdU4E0Zf3UDyEaQB9+HdnR+qO9TaOZr4GmRVL73QyhBv4MO2Dq/FmO0cuvqbtM148rWX49yg9tpSSToCunB0/0r9Og9yJgtgn61JLZUKk4fjdZA6EbKopfdgJiNhJ/DtVHTNahQ3SeasEvZHhyRJxGzLTHK0zRY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by VI1PR04MB7053.eurprd04.prod.outlook.com (2603:10a6:800:12f::12) 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 10:58:39 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::cc2a:5d80:9dbd:d850]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::cc2a:5d80:9dbd:d850%6]) with mapi id 15.20.6565.028; Mon, 10 Jul 2023 10:58:39 +0000 Date: Mon, 10 Jul 2023 13:58:35 +0300 From: Vladimir Oltean To: Lu Hongfei Cc: 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, opensource.kernel@vivo.com Subject: Re: [PATCH] net: dsa: Removed unneeded of_node_put in felix_parse_ports_node Message-ID: <20230710105835.4e4pv7nxbatx7ygq@skbuf> References: <20230710031859.36784-1-luhongfei@vivo.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230710031859.36784-1-luhongfei@vivo.com> X-ClientProxiedBy: PAZP264CA0071.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::6) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|VI1PR04MB7053:EE_ X-MS-Office365-Filtering-Correlation-Id: 8f9660dd-6b4d-438e-d12f-08db81349dd3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HdDX39162vi3Fi2+PdQgg6+mhcQ9qHUANt2AweW60EV2PiZfYgOCjUrzpQutpDeTozdCYBTlWA9PkFlO6bavt86FEW40UGTCFRVPSx8G7A9aYa7HN1UDpJxiOHTM/4YzlFr1x2+/GhhNT6L7Up2ChuQp9rwJFCe0yLK7DGX7PjMehdZP9rXY9vqPJ2LK6tP+HCyw2gD3XYvFKrfo/St6hDWlTPyqfjBhsS1aUeyQ+lP+NfoXqDnlIbLoLhoQy2PVzQEqJQuHK57XAtwgAwj1aIHSAMFqZcAiF9K+e/+uVecUBXokQT0k15k2Cs64DsWPuxAx03SQiDp/xEJOf0W6QRVFPoeXtaw2OUQuecNjHsc8ENc222qAC7k/o78vgrzomTRKDMiZKA+3uVPRrHOsCZDXZSZdR6PwIODpCYJpC3Y2Ts+v5W4McHpUQbjnAJhmgSppCo4I6/z2JoquRSIJAOqpYUw6vavrSMrQHeomQyfajDF1omnjjW6b8hoRSIlkJp/3uzsfIwpQ95hY0t+g3Vo6OO+7lZQEJ1ni1Z/dxAxSQwPrAenTgRAqB1sInDEF X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(7916004)(376002)(366004)(39860400002)(136003)(396003)(346002)(451199021)(6486002)(478600001)(6666004)(54906003)(83380400001)(86362001)(2906002)(33716001)(66946007)(1076003)(26005)(6506007)(186003)(9686003)(6512007)(38100700002)(8676002)(4326008)(5660300002)(316002)(6916009)(66556008)(66476007)(41300700001)(8936002)(44832011)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?BYn07SLBez5zsJ76tGLe8afdg7vz8P4Jsz40SdCCsC6/OXq0MUstdXTG5I5M?= =?us-ascii?Q?3sM+liLxJYVeR03Ie0JIe7OVQqs9HX4mE2QE1WbOzLPJchBZn74SUlUy2lSM?= =?us-ascii?Q?vAFfQSuiwmPDhbsOBEMnZVCNDt+8qDWoNVtA/bwcdbE2z+4Mcb6CPVQl7W9J?= =?us-ascii?Q?RTcFT7IfVS8kA5aI13P1sidsnWNpCnEMi/z5UCT8HG7u/IjhdHON8aoiRJkH?= =?us-ascii?Q?ojapdt3fD55S8SDJPBlU7CQ5JAH2qlM4jZ5ILUgbQ1MknotrnOQvj5fslFOm?= =?us-ascii?Q?BCWevf1EDaJIMi0TlgmyQTnELNHFUE9rvwA0cBL9/Z351VgVifgQScV7SYoH?= =?us-ascii?Q?MYXL3O8VCK3rKePosaBEdQ8YEgHTUXd1o7fgl2tLX4V864BODCY8DDfx2+2k?= =?us-ascii?Q?mJoTRQ7DY48wxxAEs1OCdAj6WVN4Qd7Yo0DQmlJJFuNgtWGqCAvTZcPK4EU8?= =?us-ascii?Q?nP9WQstHWYwWxZx9Y5+h8JG+X5P1NMxrazA3SnIHul9A1LZi2uWfYVqONkR/?= =?us-ascii?Q?DAh8HhFZRzPMHmEp1dRVtfxMqBEJyhNhukWVgBn8UraxenQ7M+1WEgGffws/?= =?us-ascii?Q?tyS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pN5F22t6Lpcsse?= =?us-ascii?Q?/TAyzlsAk1rWqFQPfmpSxrBdOTsFtPPbjBjBlUP0P8Prdj4zC01/BZSElDXk?= =?us-ascii?Q?J9uwUKBOMqYTXvR8UGXvgL4eBsIVUfd6S/n7F3Qhgpd/mbQYHWEgEK0Pr46s?= =?us-ascii?Q?0w=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8f9660dd-6b4d-438e-d12f-08db81349dd3 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 10:58:39.3563 (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: hHL1/3A91hp3jVqjRJUPJXjLmVei6i8K6yepg3+SLwoqlcqeaPFZfXhPOaTlNLaQNQfBiaCTuKDQG+yfgDOKHw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7053 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_NONE, 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 On Mon, Jul 10, 2023 at 11:18:59AM +0800, Lu Hongfei wrote: > 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 > Fixes: de879a016a94 ("net: dsa: felix: add functionality when not all ports are supported") Reviewed-by: Vladimir Oltean