Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp829769rwb; Mon, 26 Sep 2022 06:26:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Db2+aCCGc1Izjzp1REJQM/V3/wGhqrMGb1Q4SZXwyDoMMn8IWPxww31c5gGMLuG6pIHze X-Received: by 2002:a17:902:cecc:b0:177:f3f4:cc90 with SMTP id d12-20020a170902cecc00b00177f3f4cc90mr22159170plg.83.1664198810402; Mon, 26 Sep 2022 06:26:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664198810; cv=none; d=google.com; s=arc-20160816; b=EZBEE8O5VWV2JCtL6n2mKDgwtPI4D6h4oxFROV1ZpsPmubC5BSKUe8DBaRd2m4ePem NN1vKGErOTfSxJqXFaWIEy2vbGopZtgbfkvbQ7P6pySTHIVvUdNzfB6AJXQCUG0nvGER EUA8tVh/4xbrA/EIlOvS2TZtuBxuUQ69t3+Zm+e1no2mPHvKt73PQFPhTpvU+Hlj/jii gm4TjcLBjQZmAFgXQEBofnjfcDDgm17zhs9NahtCkaZidaXCkFTvbyNrOolbstcOZnOD um8LhjrQjhP84WLFKj3h1K42BLSb1hYVcgxVWpGsht/0tYHJVLNaW9x88vNViOcQwrvm pwSw== 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=920jDSnOntj5nXiddw55IHQ1zYIfJFrKDS4Vy8hPSmk=; b=TpUPS9LypIMFKaIY19Wxp9M/h5v8MprSE4QRzvfeS8ayHXi03j5qhsmsf1ymKKHyxF 2F0/1yp5H5TAspgA/b7rJn9BcBiGHCOAQ3lLQeTpFslqT4P/12zbXluYB49L6UeOP+tu RmFuhlSo2ULT/cUKqH9FjFKDcthidHXdKInmC9yg/iljX69G8l2aQnNuAVBYjXAkNyvz YekKOatn9OvUAOzOTTW1VznigpMP6w9iI+5h3zITvNV0VYLfFnnLJt4yk1No3LnJ5RB+ 1LZhrxsbcMDeScRFS9RrDcYkN3rOzkEBVZDnKCnFO07LPl38l93caXmVKDOjwYS2vjmJ jEhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gl1omk+4; 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 ga22-20020a17090b039600b001f561cba131si11145153pjb.179.2022.09.26.06.26.38; Mon, 26 Sep 2022 06:26:50 -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=gl1omk+4; 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 S235762AbiIZKbl (ORCPT + 99 others); Mon, 26 Sep 2022 06:31:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235832AbiIZK3W (ORCPT ); Mon, 26 Sep 2022 06:29:22 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29F7B4DB1E; Mon, 26 Sep 2022 03:19:24 -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 AE2E4CE10E0; Mon, 26 Sep 2022 10:19:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83C39C433D6; Mon, 26 Sep 2022 10:19:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187556; bh=bXYP9ZTEEApxdXMoWaLzr91TPKZYdnrgJpmYCepzV2Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gl1omk+4GXCqzYVHBkcRz1xHMTHeQjyG1lrM2fi0omHFgi9kcOR19MmtL0IogYKQZ pFKHgx9vyHYu6BbI4tJmoi6wV5AuufQJ5tEseBQlrr8yRLS/HRoWrbD9+bGi/I4b65 icPaOL2v2MgxUje+yWg+iObQ8KoMmtHmF/BiY/t8= 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 4.19 44/58] of: mdio: Add of_node_put() when breaking out of for_each_xx Date: Mon, 26 Sep 2022 12:12:03 +0200 Message-Id: <20220926100743.058052699@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@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/of/of_mdio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index 100adacfdca9..9031c57aa1b5 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -283,6 +283,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