Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3408578rwa; Tue, 23 Aug 2022 04:24:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR6PpbSNgwRAplRynCkvZb8UOrFG3izHtJ0lBH1sYvp3DitBHZKJHp/K/lU4zdApsn4z7PSr X-Received: by 2002:a17:902:f712:b0:171:29d0:6f9f with SMTP id h18-20020a170902f71200b0017129d06f9fmr24424139plo.84.1661253865730; Tue, 23 Aug 2022 04:24:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253865; cv=none; d=google.com; s=arc-20160816; b=mSGDlV1wi0mFEYxr/qs/EWBPLuxwxqjT/M1mYmtktDSi/MYZhl0yUpvom1DHnkD4v0 JmrFPAQt/Vh7WXSm/3u87FVe3JX/wjXrmN2YNn+Xm7v3YAJfgqpqndTDb7i9Pv0cmH8y ozj9QrW183unAqTsAYTNsz7Vg7UeHodxZg4zHGbdTjTWTNitHKaKq2gZ+TZQrwhVfM3I zuvTmcGq33/K4Aq6iNL4iY50/g2dwVw54gkQb2QNByS06FiX4yg6Ov+v1CzJ5+lc19XT viPCK+dGvPxI/+iMJVFBS6on7JRMGlacdJl6dU+4VGEuzyVk9u/oKwS9hWLhA50+O+3v GVbg== 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=bXvdPhygiOBU4YrN8BwtcN4p13RvuJF7S1tiVK00YJPde8YfYNgpx/1BVcM9XTxEUl 63lFUUNwDdfoqQQnC5maJX0tDbxWBUP5owd/Ekxo99ftlCVO0F6fhlnwjW60jYeGXWtE 6EsKUKcN7GGUwHKi9ofllNGxWX5xMx3WO/mffpmXW+npDsX2DQtq+tZzM/+wt8xjV572 F59G3Wuaba10Fyv6o/R+fLZOESdCx1O5ebNeRSN68wdV+iutMFcEm5sRAa6Yq61EW3RL th9Um8anSqEILRf5cVBr5mxYnWA2IwcZCz/NN/hBb898nkJgMvlPGkz/0EkwGFX3q9hH /8Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Nl5Fa/4X"; 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 d6-20020a170903230600b001708af3828fsi7879649plh.62.2022.08.23.04.24.13; Tue, 23 Aug 2022 04:24:25 -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="Nl5Fa/4X"; 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 S243817AbiHWJwy (ORCPT + 99 others); Tue, 23 Aug 2022 05:52:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351896AbiHWJu7 (ORCPT ); Tue, 23 Aug 2022 05:50:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B1059E2C0; Tue, 23 Aug 2022 01:45:38 -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 B5E0461377; Tue, 23 Aug 2022 08:44:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9AFB7C433C1; Tue, 23 Aug 2022 08:44:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244259; bh=SST7BgK6nRiYlNdnB7lLK158LHGtjk/AuY3lc7GNw78=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nl5Fa/4XFJvcjwumtloy/T0pI8AeuHn35MUyuxkuKumPuFDBqHKgwVvDibS95OVFU abTFI+h5ABdF8AKKBdylf4us/DnlWCmek1Kj8JdT3Cj9OWmE+xnUeqKt0jPXZSPpDO L+twpuvxAfsyoASJMCPVPziB8qvCUHi1oJ0nAt8g= 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.14 110/229] mmc: cavium-octeon: Add of_node_put() when breaking out of loop Date: Tue, 23 Aug 2022 10:24:31 +0200 Message-Id: <20220823080057.604900868@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080053.202747790@linuxfoundation.org> References: <20220823080053.202747790@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