Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp821205rwb; Mon, 26 Sep 2022 06:20:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM54ERAxttX7d4sUd0qxKo+L2Ks0tdyE1GvPv16Tat/4Z/PFGctBxT0VuMkrnpb+MUTLNH8H X-Received: by 2002:a50:a69d:0:b0:44e:bf40:395f with SMTP id e29-20020a50a69d000000b0044ebf40395fmr22156207edc.234.1664198430979; Mon, 26 Sep 2022 06:20:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664198430; cv=none; d=google.com; s=arc-20160816; b=AruWr9ke/JwN3pCXmrQvvrrClWdRxXMOrIOjQthMBIJyY9k/4XQ58VeTk8WPohmeKB GWdmHHVRyUqlaXzeA45eC+EaGK+TyEMO0cU1IQNzJ/OvQVGnBnopcZ9NSbExmZLxLOFE pixm3RVIEDIdImIjJzDSlE1KduJG6l3aty+BKt3dYSNS4Mhwx3CkxSjppiovxYxrIg2Z EpdpWAC7wh5JJcFjJop2vdvBdHxnwJXYbpkaPu0jKeLmjSzzpBVOr9eufJ6JOlkc0t5I lCr88GRlblCwVfqO7OA2NQOuXwIzJPmPciAKrUbWsl9U9GVRYcdKouN/x/4U/sZ8DH9a l6eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gJqDDJPN0x12D0mmk7G0F1Xxa1UNJsGTriJ/6oXcR1I=; b=ovGvu92hslVDlBez8hoWnkmHTnzgjr5uWhQ3cB6ughehKmRGwc4MencYiEBuLwy6mw ykUl4TY95FYcecEbUhXtOXFfKUFzVWCAhZNWwI8VjdQviPBoDDg5/FmOdUXvChovuJf4 FixPwqSUdl/pe5KT9JVxDD7PKSZYJilFLUkFlHqv7boAPq28D0NO2UeITqhHJCZgFOcC mlHEfjcC7HKiv0+iDvd3s1XWGxBaKRuUrmlXsQ4YOiSrURFHviH4f02ns6NmHBHaTVkt 9kBKysGE+/dog4D2bTqNl2GhP155OxZPXc+PdkixxV5Vez70NsDtpZI+cA83BP4xA6hz zuMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RCeNFU9S; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l6-20020a170906794600b007417c6edb0asi16544167ejo.402.2022.09.26.06.20.04; Mon, 26 Sep 2022 06:20:30 -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=@linuxfoundation.org header.s=korg header.b=RCeNFU9S; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238529AbiIZLwP (ORCPT + 99 others); Mon, 26 Sep 2022 07:52:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238528AbiIZLvm (ORCPT ); Mon, 26 Sep 2022 07:51:42 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6E3F75FF4; Mon, 26 Sep 2022 03:48:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 95932CE1101; Mon, 26 Sep 2022 10:47:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A87EC433D6; Mon, 26 Sep 2022 10:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664189253; bh=nXLbPcp/lmo1PNRr7WbCA1M/+VZrKaywAvL2mtf1Ros=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RCeNFU9S4YC3jFyeYvG5Xv1NkMfhs/nFQQ5YsC+Uek1EOTj2cWM68LuvdczKxATyX Mz0rafHaxoPAmSAPhamvvcyYME2FVzFd7SUiNeEzjjARbCzRVFsyF4EN+LQo6j+RYD /xC0IcDqZdRV77mmFQQxJDhh4U5E1u0C4Mi30+B0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Liang He , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.19 124/207] of: mdio: Add of_node_put() when breaking out of for_each_xx Date: Mon, 26 Sep 2022 12:11:53 +0200 Message-Id: <20220926100812.121191117@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100806.522017616@linuxfoundation.org> References: <20220926100806.522017616@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 From: Liang He [ Upstream commit 1c48709e6d9d353acaaac1d8e33474756b121d78 ] In of_mdiobus_register(), we should call of_node_put() for 'child' escaped out of for_each_available_child_of_node(). Fixes: 66bdede495c7 ("of_mdio: Fix broken PHY IRQ in case of probe deferral") Co-developed-by: Miaoqian Lin Signed-off-by: Miaoqian Lin Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220913125659.3331969-1-windhl@126.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/mdio/of_mdio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/mdio/of_mdio.c b/drivers/net/mdio/of_mdio.c index 9e3c815a070f..796e9c7857d0 100644 --- a/drivers/net/mdio/of_mdio.c +++ b/drivers/net/mdio/of_mdio.c @@ -231,6 +231,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) return 0; unregister: + of_node_put(child); mdiobus_unregister(mdio); return rc; } -- 2.35.1