Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9230109pxu; Mon, 28 Dec 2020 09:55:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqvoUrIRinyJUazkGAOjHuuZ9obn8nktvV0VL3Ce+nFxsv7QPdxXNzyAXyNalwUJ3f6R2W X-Received: by 2002:aa7:c7d8:: with SMTP id o24mr43659113eds.328.1609178143100; Mon, 28 Dec 2020 09:55:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609178143; cv=none; d=google.com; s=arc-20160816; b=Az1olfLltbLUTsr3UYRPnAUbBlBKe9BMss3OEC1/YNYPvNYP4qdKKFmlKROHOUe100 hBupzBazHpYX/JYpvlOEJGYB7iq6GbiFCnsYa3kF5uN8y4ufu1muL3OtmUDLHgeLG8cu Vtidh73ZIV6T9ds5YfgRuC2nZa7wvoFQaydkTbPAtNyIpEZ1CmcjudT9PJ7+tbYy+p0c TgBdDvIUicvmJIa0Wgki3PRuejlFqImegKLWU0sbf8+sTcvW5gmGGMTy3z8sJGFnfjNx lFbNnoNgqBEOKPcpZBejbQFm9ooy6Zv4hgBd2WvG2ZgO4lfBfLksCmP0tLxfB7xWOBAJ jMUw== 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=suHbAJK6COCS+knsrutQ5aRkQ/gTWRmCuvpkDR8vdRk=; b=sdOFNonHgUtXwv+qVk0SqK/7oj3ngywccqkgeSJXSYYSXG/LyOZNMdPMMh8MrgeRqA ZpYL8fJU0GH5P3h9kKSM5xvYdbhCIKn77GlCJ9GwO+ceRlCZ6ODlE6Gb14kKWEt2kDvT DYSNbRBCua1mLosfC6E5tUEkTWA23VQc00ANUbjXnKcuXyQC/r1+MTYIAOTXgEnhIUFG rNwCBPgM//ljMCRiNH1U8j0g3a0iJOUo9VU4kyCjG75tiQd+JIaRK2xAUZ7BYvF5fc+1 Y9S9GELBeLxi7c1MNoNtAvQAZ6rt01jP/4Tekq4GUkidR/gBn+LjYQ9BTDTz85bht5uM zEtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sj1nO9C9; 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 ga25si18827251ejb.636.2020.12.28.09.55.21; Mon, 28 Dec 2020 09:55:43 -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=sj1nO9C9; 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 S1731618AbgL1NRs (ORCPT + 99 others); Mon, 28 Dec 2020 08:17:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:45890 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731571AbgL1NRb (ORCPT ); Mon, 28 Dec 2020 08:17:31 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7469322AAD; Mon, 28 Dec 2020 13:16:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161411; bh=6H5pjMjHihSttCdD9uwYDZanw03bglRNU90wlsoq1jY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sj1nO9C9I6pjLtbKm7F6dISnhHeTOHkQkjq/w1hkFn5anYMvt4N8BKFhj+FZfWZ+n txnNBHKzSkghHOqIJDkN/Xk0SMQlxtrMLtURRzCuLKmTd5Ny3KmlDX4C1lw/MwqUzv 3nPIiQoF1SZzaY4hWpvjOvNyANiI2nfDPWPg1AN4= 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 4.14 175/242] clk: s2mps11: Fix a resource leak in error handling paths in the probe function Date: Mon, 28 Dec 2020 13:49:40 +0100 Message-Id: <20201228124913.317558443@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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 f5d74e8db4327..1803af6230b27 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -211,6 +211,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