Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3089557rwb; Mon, 15 Aug 2022 17:52:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Ej+umcOaQ0XuoXw9LNy5B1pjgeVKfPfvLkiAQbiHpEqZCN3kmSjnrURI3lkW9gSmtDmmj X-Received: by 2002:a05:6a00:1949:b0:535:15ee:3205 with SMTP id s9-20020a056a00194900b0053515ee3205mr3378341pfk.34.1660611148147; Mon, 15 Aug 2022 17:52:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611148; cv=none; d=google.com; s=arc-20160816; b=0uXq0C4iaWki+gcK5+FACO1FBnVWS/AIRqVEFDgB1JkE5YhBtEntQ8QBCYuIgde3Uf jDVMzpeDh+YuEvCnSQmUq2hJ4YKDHlLI58qikTkBvLLtnapr3bLQEwi1lTRuzop21JzO 56X3PIcmuOgg0DZgLKyASzAm0PjskGMOkdB8NUbmLD6HKW6DQqJ7jc60M8Wr9+RujrYo 2YxjPKAQ5i8dSQAvA44PVF3wCu7mTM8OmHdjmkYRUxOMEqT5HOycUyYPZddcVQqUEfOo lL7TaXv1qKkO7UH6McIwetwepMd/NgK7K6ZIbQx4X2V9KTq7xYhSVTwbcr1JtgTsnfM6 KXug== 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=yzxBXQdKFx10haKsQuyAKuo1D+CeUekj/TYYEmtB4qc=; b=haabVKw5gBzYR1UuMJW7gGcug0MZ0/cSHNxkS1/tQvep1J+FkbZtPXs3jsqMKDs+QR 6jeE8K36D2/HuQ1u2BVnevo3k6L03YzpI7dS8BCP+xNl2iv8bi+Go33EV7ey33EUC1Si 5nSFmgsGgaBpC9vDVvXSdeObMXMUXdZhsmvMDb28k2wYKpE8lOrmvqf6hSG5MiUNnsVm OLPAJ8h69QZIAi4qAX89ijynshyba/QAnDwHPyNj6pTn8+HfcG3jieDdJD+oqa5RN2MH 2Ib1GvPPSmsAb4qD1LLTSdJkPLxZvs6NHN4hyf6OkO7U0cFizwTt4wyatcSl4t+e5lgB kiLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TGizhPjM; 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 c8-20020a170902724800b0016f01d552bbsi10839672pll.483.2022.08.15.17.52.15; Mon, 15 Aug 2022 17:52:28 -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=TGizhPjM; 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 S1352108AbiHPA2t (ORCPT + 99 others); Mon, 15 Aug 2022 20:28:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357526AbiHPA1N (ORCPT ); Mon, 15 Aug 2022 20:27:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C503E18057B; Mon, 15 Aug 2022 13:34:50 -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 ams.source.kernel.org (Postfix) with ESMTPS id E995AB811A1; Mon, 15 Aug 2022 20:34:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2152EC433D6; Mon, 15 Aug 2022 20:34:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595682; bh=0rSuf08xxpAs4juZrf9DdyilhYifmFUsrkyHzwVov84=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TGizhPjMgtZ7dyrrrGjOGQBhHC0GnUs0vx+REFFDBmAGLzRE1PMOPfDcWvd11sLoA IWDpQ/sDcGJbB6Tg7y4JEt8cVjrU2AGt3g8PcGVXWxnizqNQotbK4omk7yJJTVr4sw MDkw9dgItIpuX2ldTIteGEZS9gOfgVNFHwq45HXw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Liang He , Robert Richter , Ulf Hansson , Sasha Levin Subject: [PATCH 5.19 0842/1157] mmc: cavium-octeon: Add of_node_put() when breaking out of loop Date: Mon, 15 Aug 2022 20:03:18 +0200 Message-Id: <20220815180513.170071651@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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.1 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,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 From: Liang He [ Upstream commit 19bbb49acf8d7a03cb83e05624363741a4c3ec6f ] In octeon_mmc_probe(), we should call of_node_put() when breaking out of for_each_child_of_node() which has increased and decreased the refcount during each iteration. Fixes: 01d95843335c ("mmc: cavium: Add MMC support for Octeon SOCs.") Signed-off-by: Liang He Acked-by: Robert Richter Link: https://lore.kernel.org/r/20220719095216.1241601-1-windhl@126.com Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/cavium-octeon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c index 2c4b2df52adb..12dca91a8ef6 100644 --- a/drivers/mmc/host/cavium-octeon.c +++ b/drivers/mmc/host/cavium-octeon.c @@ -277,6 +277,7 @@ static int octeon_mmc_probe(struct platform_device *pdev) if (ret) { dev_err(&pdev->dev, "Error populating slots\n"); octeon_mmc_set_shared_power(host, 0); + of_node_put(cn); goto error; } i++; -- 2.35.1