Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3409719rwa; Tue, 23 Aug 2022 04:25:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR4SwpQqCa0b9mlqmehYjTvGX9kpsdYlHGe4R908xGswGdSEHtaNIOwpoUOoyoNYPB1fbnVI X-Received: by 2002:a17:902:7689:b0:170:8b17:37f4 with SMTP id m9-20020a170902768900b001708b1737f4mr24346989pll.42.1661253935623; Tue, 23 Aug 2022 04:25:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253935; cv=none; d=google.com; s=arc-20160816; b=Av7S/ju/tjKkSg7AoCZCJUHleGbVl57KGzM4SCVLKL9V5eZQ7GjVe5rFKeYIDuzyyl oCus82pewDLXlNJqbkLyUuaP0KTx99reJQ/K5vdIgOjvID4OAduhD7zNrWOP+cmoopeH S1NLamnr7nTtcjVS3FY6McB9cGJaBAwsymyViZlFAqxaJSu2qkZdEv1zo3IUvcq+7wYW ZqDbSoiselRbbYX8ES2RZ+L08EfGY9/E7EuH1FViyxO8pzw6niNCKpNa6/bm7ymfcIYZ 4kV1VH3pAAtPJErmmsm6Mv93y8m6hSEayzeEm1QbW9CrrtfmGzSA/S929ydVzgYDIXNB WVCg== 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=654njSpFa3gQLHTj6Le9HgmaFuqCyDE879TDTMXeG1M=; b=QmWKMIqDaGMG+Qm0Dq1jc838Dwo2VC4lW/ysEXhO/HSm4K8GhTfDZZ/57pFrGOrtZu ZRHMuGUDxwHi3RmBaQ0PHwmDn9Z0NimIHfoaN9R9HIVd7DCtepIC+FFAMaT5x/0uLtrA sSPoHGbxSjr0Z3x2UVICMQ0D6xXhpIGp6GXh6Np/mViqOEZHwuTcAAyUHYrUGwt0Yv/9 JB8wbjf8gcCYWFUm69PkSVkwzninnkxxLuUkXLKaQIWbrunslxCwOH1i6cCuZ9ti14gT NexxlKjz+9fIB7RNV6459bQ91SZAtEos4ywHrMWFK/Q2OUhUQgn9J0rsgk6bz9TCSeOd u+Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WNlH11uM; 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 f8-20020a17090a638800b001f4fc7af64esi16164143pjj.101.2022.08.23.04.25.24; Tue, 23 Aug 2022 04:25:35 -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=WNlH11uM; 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 S1355771AbiHWKoS (ORCPT + 99 others); Tue, 23 Aug 2022 06:44:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355512AbiHWKgW (ORCPT ); Tue, 23 Aug 2022 06:36:22 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB537A61F8; Tue, 23 Aug 2022 02:07:08 -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 CEB61B81C89; Tue, 23 Aug 2022 09:07:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E4DBC433C1; Tue, 23 Aug 2022 09:07:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245625; bh=SST7BgK6nRiYlNdnB7lLK158LHGtjk/AuY3lc7GNw78=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WNlH11uMhHMMON0VxxApPL4Pdv9e5TgkEGIdm8GMvbSgBt2s+3kqpcweVX7Afi3dU BUcVf+Q329gdEEcsmpRSdTB7LoYtNemagbHqSTqqnvsCgjR825EOaiRvwPhreYD7K8 MWkNz+fKLULnk5B7/mmFHmBWyTTf6v7HQfo8ieYw= 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 4.19 136/287] mmc: cavium-octeon: Add of_node_put() when breaking out of loop Date: Tue, 23 Aug 2022 10:25:05 +0200 Message-Id: <20220823080105.038918411@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080100.268827165@linuxfoundation.org> References: <20220823080100.268827165@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 22aded1065ae..2245452a44c8 100644 --- a/drivers/mmc/host/cavium-octeon.c +++ b/drivers/mmc/host/cavium-octeon.c @@ -288,6 +288,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