Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1858170rwb; Fri, 19 Aug 2022 10:32:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR5cSUUiWFqKVZZVi3czwn8VxBDzbaVhntWTa19SayA6/TJE9sXeacImnkLwqqCZQpU2925y X-Received: by 2002:aa7:c1cb:0:b0:445:da21:dd8f with SMTP id d11-20020aa7c1cb000000b00445da21dd8fmr6879240edp.145.1660930370415; Fri, 19 Aug 2022 10:32:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930370; cv=none; d=google.com; s=arc-20160816; b=UOnUjA3lVItUlfbdSdYh04I7exsOBC7YHdvt7dSE4tmd+sK7DcVd+mSNNw3PHwXou/ sx/tnGL61bwE+TjfaGEKb3FwjS6k55WIi6K1MMJaaph9d3xbTyIGCmqbqZR89t++3oFC /qStiSW30EzMl94Z8c47PfwFwfywT2iGKjiAGz0f/ehCeJZk/iqU7o4DqQZz19yrLACq nfoqCFXikPH5DMasKP3qTg2vA8aITvcYhZxuFTkSxiBkKxS2Rg6TyjgStMqQ9VOoo+6Q Qjb/WoehX9uOe1pEDZoDggTxf8B2j3CgpMsNAprbdCZoBYopud4opdLiwmkl2FLY95nh 5kTw== 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=EgEV0NUCA8+EniHCxDkqFr9xmITMUJlagFiV5tTPkTBp+Jxf4Gu5U6kRMAR/9kGDzY qM3H/uPRpFqUgzIHn6bIuP9pO86SiNCp1e8ykTb8eV/YY201DLhRcBMnqI1UPG4g+EK4 hoZvSknQ3hB/VHiIPideqoNwNb4q+QHSNmDilVqnOcvLN61kORzN/Dm5D2T0bnJndvmL qnhtTGzMMYbmOr83+pcxCbkB35pf3Sv6qm+EEyWUQefjAXKhRPhDvWOwlbZVF8IVgkJk r3sLV59928SBI6dwfft7jRLNE2b6JFdyT+oTF/keyFnAFsk7UFEWufhw+bzOzTOWydhu byfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2kTlsVuj; 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 fb17-20020a1709073a1100b00726b8cf8debsi996383ejc.869.2022.08.19.10.32.24; Fri, 19 Aug 2022 10:32: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=2kTlsVuj; 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 S1350042AbiHSQeH (ORCPT + 99 others); Fri, 19 Aug 2022 12:34:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353188AbiHSQbC (ORCPT ); Fri, 19 Aug 2022 12:31:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 147CB11D529; Fri, 19 Aug 2022 09:05:14 -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 B107761825; Fri, 19 Aug 2022 16:04:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9E92C433D6; Fri, 19 Aug 2022 16:04:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660925094; bh=0rSuf08xxpAs4juZrf9DdyilhYifmFUsrkyHzwVov84=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2kTlsVujd273sMzw0OvFCxbxse9Xu9EBn3RzBQFkvCSETh3q1FhYfhovrZ/fLV26h 3flVRBE2uXzHcW+52ESDqRNmqsL+DrIlvjqLC3AtVcmFo+hXJSQ+6yIka3ujPSwkWM 6g53l/Jko3UVBROyj/z/Moixig6lZDDeQy5h13hM= 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.10 342/545] mmc: cavium-octeon: Add of_node_put() when breaking out of loop Date: Fri, 19 Aug 2022 17:41:52 +0200 Message-Id: <20220819153844.706015370@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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