Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2884780rwb; Mon, 15 Aug 2022 13:17:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR76sxQ+dLVyYsNwDlTSw4mgHnFqyQ5lBqR+xnkslYRfMaEY/wpLFuyuRaKKd+2yhgRRHFyW X-Received: by 2002:a63:8ac8:0:b0:429:71e3:4af6 with SMTP id y191-20020a638ac8000000b0042971e34af6mr4536103pgd.218.1660594637955; Mon, 15 Aug 2022 13:17:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594637; cv=none; d=google.com; s=arc-20160816; b=m18rhpbdAmw35QnnNeRQnFW53p3s577bOB1GVB3Mp1ywxNE3BVcMIxZz7mEmqweeTv Labf87iNPGv8k7CO+Hxi5vLwYGgq1h9jOjXADTmO+iybuKD0KVZq4+ilB2jsjLYhAHAy Pv6IHuNEwriZ9/hNVlK73vkoT0rYL5aS7itjilT+tg8aYf3c3FG/J0DmCXi/vftrCc+j B8HqrGRZer8OXIlprK2ARf6D8Sqbz0qQH5YnANdQXxSI6vCCrudfltxsJoi0ERKLssYR 99jF4USbNgq6FdSyVeABTsCpcbUw40XrEXcpesucEfzn63VBrmS2qvsvb5NJMEgw6EY1 H0XA== 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=o83Uw5JNM1flynTI8biQWSqLuvexp57frTg5iTKNv5+o4wF8GZQNJlIsryxzFIsO92 Gx9MNb5E3B/5bnp61FuW7gFwBknuWywSAUL9b0rh77FZT0o0i1/jT6eg3XENgoQ4qdsw KuRJgoAyzg8f9wXhelvmFTLxb2w2eGQOzSft+nPPkoRSUhKVLJcYNWmcwT71SNTG8W8K 82IzUPSCfndpUrZKRx7lFR9RrDw+tazIRDNhHl5tIS+P+ukqCzkVcMPIJ0OZNowox0+q xVLph6Wi31O4lJdrPK+FXrfsoyqDWkITRLSiZ7bVpBp13HRyTXUGXQ8ihkygayd5T73L fVdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=t+wrWl8B; 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 a20-20020a17090ad81400b001efa8c6d942si8224285pjv.189.2022.08.15.13.17.07; Mon, 15 Aug 2022 13:17:17 -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=t+wrWl8B; 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 S245617AbiHOT3F (ORCPT + 99 others); Mon, 15 Aug 2022 15:29:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245158AbiHOTZq (ORCPT ); Mon, 15 Aug 2022 15:25:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF4583DF17; Mon, 15 Aug 2022 11:41:13 -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 6FF42B81084; Mon, 15 Aug 2022 18:41:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B526DC433D6; Mon, 15 Aug 2022 18:41:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588871; bh=0rSuf08xxpAs4juZrf9DdyilhYifmFUsrkyHzwVov84=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t+wrWl8B69DrdwxxvJ7hZDxYWd2fEM78hHJDJZbGr1THXLbRJqGWtuOmFmxGlrfM6 3fjjxDf8+xRGbka6Cen0+3xWvTyxE8ZQLuJZI6hJ+T/177HU15K0iDzB3LOC/h1/Xr sCKBYplpabkko6qTi2KIf5BNkUvN173MCN9xJY+0= 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.15 524/779] mmc: cavium-octeon: Add of_node_put() when breaking out of loop Date: Mon, 15 Aug 2022 20:02:48 +0200 Message-Id: <20220815180359.662011987@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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