Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2981491rwb; Mon, 15 Aug 2022 15:23:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Kc/SI5fsFlBwRRkKkQr9X85PmKG0uYgDSdpRW6/RIiLLdAYpirIDowmsvcgig/bzSTfAn X-Received: by 2002:a17:907:970b:b0:732:f76a:97a2 with SMTP id jg11-20020a170907970b00b00732f76a97a2mr11833880ejc.396.1660602209081; Mon, 15 Aug 2022 15:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660602209; cv=none; d=google.com; s=arc-20160816; b=0M1WhIopyeI/TlrQZEv6P/P403/PLSYY/HvYDIMWLoqjZkL1A8QRYQ/bV56DRQF/RW hMbNZpxfeOBk74w02WwyU+HwV5pAuDwsnvqn6xQJDg9VWgM9X8zhA3HqgcTE6vSFIc9p Bn5G9Iufz9dnQd+H8PwjgqwThuUcISNA/4+GolY21iYLPyJtoP6Vdd2yRA12q0czRE0U 3cdaSUoUIp6MshQipWaLmfN5I/OPb7JprTqoigU+2m0ToWqaC1mYLlGb2lmFUlBeF6jt Run5iP4B0nGwOgm3liQL8R4R4D237rMfkAtAhE6pt5rZw3qzf55L3V8nQu9lm6xgMWrQ x0OQ== 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=jqCU/E98ksba8RDN1bE16JVd71gF56usa6C9AdGOacNB3VO9pDHgFx2rZpF90r1OCt 402qyymRJ4KiG21TjJnsvtLoFZg0KHRIv/yyBV6DxXU4RCD6WLYkxGHHJCmz1crBanXv FTW0pm/TlFq6NfPvPqeS9LyIRlpVbh9rv+hG39jbBcSApiAI2tLyOjpCCnrsiiS30wxp J7ER6Zk29bO3KTYCHcP0CusUc4+McOY4kinTdotHwLKNk2gEO+YTqHDqGgOYxsyzIQZC tl9nZmmZXb8tzrBdff62BC32EvMYSpOE96HqMI0E59k/xFdVSqA/doaHJUFO4Gu25erA cQvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=s7hDHTbf; 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 b8-20020a056402278800b0043dd6d38021si9362148ede.243.2022.08.15.15.23.02; Mon, 15 Aug 2022 15:23:29 -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=s7hDHTbf; 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 S1349740AbiHOWVf (ORCPT + 99 others); Mon, 15 Aug 2022 18:21:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350040AbiHOWRZ (ORCPT ); Mon, 15 Aug 2022 18:17:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A73303FA35; Mon, 15 Aug 2022 12:40:44 -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 dfw.source.kernel.org (Postfix) with ESMTPS id E1A62611F6; Mon, 15 Aug 2022 19:40:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBDE4C433D6; Mon, 15 Aug 2022 19:40:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660592429; bh=0rSuf08xxpAs4juZrf9DdyilhYifmFUsrkyHzwVov84=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s7hDHTbfErnEOTcMeRb+qLK6UgQR10OORmiB6UM3yZs1bRjq4nDphHUsKuk7cj31k VPf3J/2xMQU1ogCWfpLZEshZwJbeF/rlmPxkBAj9qYHnDV/kLdUJQY4r4PmJ0AZgO4 JlpG/8CcGVdec570Cf2ICWVKbi40PytOhdPMlZKA= 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.18 0785/1095] mmc: cavium-octeon: Add of_node_put() when breaking out of loop Date: Mon, 15 Aug 2022 20:03:04 +0200 Message-Id: <20220815180501.735590717@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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