Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9093564pxu; Mon, 28 Dec 2020 06:29:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNC/jV+i6VcHDrV1wLKa0Oq1PHhefkTUvr/HoUZZVmR8De5pWMXA3YR2NMuFXPiaynrXR6 X-Received: by 2002:a17:906:814a:: with SMTP id z10mr40641341ejw.96.1609165757467; Mon, 28 Dec 2020 06:29:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609165757; cv=none; d=google.com; s=arc-20160816; b=mXJ07OpeApVDvh5Hw6hVZt/dzKMI+PHN54u+bQEbO9MgAbggFoEOrQ19ko92M/14vq JE6cXtw8ucfl7H5+yRSiOcn6GcSElb7Bz/h1pyD4aSZjxQwUDmFHlRZGaCTP94+i4y8M XhJpgkoX30Eq0QyZsedpgXrCY+Icfllu0OSHsqQsSuAPuTnMLOh2Ywwg0shvZm2nyu8R EAysSPO5UNwgsg5krFduaqVD3Jxu3ejJzWARBrSArtso0ZnxdG2x0v3WJiNmgYCv1Lje dPomNDo0aVz2ZkV65ps0cJymwTtP4lMhPJ2wCqRnOVf4uvv2I2ZDtHRxBhbBEE4NmYYJ olNg== 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=t7ePsBrRkogKlkZ/E7QXl/6cRWeghGRGW3sw/U29Bu0=; b=C6pTK7/lD1M0QvZhnDcnRVpqzOylyusFA7v7/BEJbVxpcYa4NYkpV4+0euicOPhV0C sk0+vHExAa6g/EgsMPErKa6GjEGcmbZcQYIRWNvcTBW/WJB+09Sqc35EX6uKU6KzGS/P 4G2sGA3fUjzLGC5/qqlsbFpVKhviR4DgpfCabryHSn0qImPVjNye0DD1g6S5IqR9ntn4 9Q6UmTfpjJblFxSlMajHFcwB2mEB3KaTKY0kL5IVkFa4Ir8OFVnQOeW7Ox+0Z3oatEa5 NwdRg+sZ6GRs5UFSEkRRaARDyVdjdSvlt+baOJ6GOaJB1tWOFbt/AkSazhlm5H9NdKiF RLFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yp3fuchj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a23si20341944edn.292.2020.12.28.06.28.54; Mon, 28 Dec 2020 06:29:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yp3fuchj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2502903AbgL1OXr (ORCPT + 99 others); Mon, 28 Dec 2020 09:23:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:58854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439210AbgL1OXF (ORCPT ); Mon, 28 Dec 2020 09:23:05 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E8BE1229C4; Mon, 28 Dec 2020 14:22:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165344; bh=Lbfd0la89QEGWJh+oYHU8RUqaVQDyY7sMHwdW066inw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yp3fuchjRxw4khFgvabISW/BHgevIcl1ffOTL4eycCLF3IxGSFjrPAQ83FYtiucvk L1mEt3QfEty0hCvse84rg1969DqLeZKGR3l7c+aN1a3a7RDRdzTNJkHWRLUqPGdpcv E70l88Ep7a2drbXQsNCyVBKRiE7dMCxuQxb6ZI38= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Krzysztof Kozlowski , Stephen Boyd , Sasha Levin Subject: [PATCH 5.10 497/717] clk: s2mps11: Fix a resource leak in error handling paths in the probe function Date: Mon, 28 Dec 2020 13:48:15 +0100 Message-Id: <20201228125044.776975691@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET [ Upstream commit d2d94fc567624f96187e8b52083795620f93e69f ] Some resource should be released in the error handling path of the probe function, as already done in the remove function. The remove function was fixed in commit bf416bd45738 ("clk: s2mps11: Add missing of_node_put and of_clk_del_provider") Fixes: 7cc560dea415 ("clk: s2mps11: Add support for s2mps11") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201212122818.86195-1-christophe.jaillet@wanadoo.fr Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/clk-s2mps11.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index aa21371f9104c..a3e883a9f4067 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -195,6 +195,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev) return ret; err_reg: + of_node_put(s2mps11_clks[0].clk_np); while (--i >= 0) clkdev_drop(s2mps11_clks[i].lookup); -- 2.27.0