Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp524967pxb; Wed, 3 Mar 2021 08:52:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwVAH5qm83Vz7ratzr9MzQCuFBP4LPWp6BkUXKjtUcDtI1+T/YO/w1miWuXHqyUtVd8ThHH X-Received: by 2002:a05:6402:350f:: with SMTP id b15mr220571edd.6.1614790363767; Wed, 03 Mar 2021 08:52:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614790363; cv=none; d=google.com; s=arc-20160816; b=MtUbWRZ/e97WCTIKv+qHtrNq/fxxdRJbcjiyAqc1uVKVs3i7q03BNAhIU/Qr+ldqHu Qet7fiiG1dUpq9lgbfHWT5hmhyEZPrEz4UxPV3mUdpcaOBpYkNpLZu7PNqgnG/GTw78P NSRzJID9CnpHu51/P7w/Pje18uQi21RIDs9fQSEEJyo0LrWo5KS+JxYKrkp/4p5O2kAW HOEJWwJDt8JOknNqCyBbd3n9b8Kp3uOst+xmJfNZ5polujBYThThe/ndLPixAGt6J0kB hCICOtUnwUAYtf2y5Xzg7RrHWgTGxkg47RDcB5RDL8Am1zNV3Wp2ScyV7MTwZzY2gzgX 6pGg== 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=bAsLkwc3eVip1LDto+DUQKD/bXa0PejCcNO9tPobv/E=; b=gI7NqzcCyeVP9me7tnJXMl9Akp7iNjbt+xJAl7IAbIhHTj7JXrcDAI0GM99z1xMPK5 jgSl1l+F2p26LS3cM/EJDjIIpahOV41adTlDu9O8+nGfTuc8SSwhyIM+IgX8IsT0Ikfb 9PJtt+/ZJljWlrD6dUyoAL7WqN6H7XXF5+pZ/pFN+p4DwqAZFbG8I4cuBuiiCz22zztK YmQMocqE1dfyLwf38HRz4+8/5a3PhGLjywBRRUXwegsMcPfOB+Wc3P8mfveWBzItU/C3 CnmI7+oflOx/UOqPyRrNwMH3Jm45hI7UzpLb6TJg6ZqEiZ3jQA4ertZiyA8KoSA1W5lz l/hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ngcPNO7v; 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 39si2864409edq.111.2021.03.03.08.52.01; Wed, 03 Mar 2021 08:52: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=ngcPNO7v; 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 S1347901AbhCBAVf (ORCPT + 99 others); Mon, 1 Mar 2021 19:21:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:41440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238920AbhCASZy (ORCPT ); Mon, 1 Mar 2021 13:25:54 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7087F651EC; Mon, 1 Mar 2021 17:19:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614619178; bh=eRYC3mriO5mjAAwQT5BjUCe9yzdjSZHJfTukFJR/yk4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ngcPNO7vaweg0fxknHYAg/ZtNxc7TK06uMdnS2Hk+Hq2pdMqpGyHaPP4K30NAV7JS Na/+XC2WRFGSdqJU1KswuQxyQzvM7aIra/CFBDmKEWcQKUro6k42GQeAk2gWbRXpmd uf30ZUUwKk24LpWQjFkqvhG2kvb3w07tL+Nh1tgc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Ulf Hansson , Sasha Levin Subject: [PATCH 5.10 331/663] mmc: usdhi6rol0: Fix a resource leak in the error handling path of the probe Date: Mon, 1 Mar 2021 17:09:39 +0100 Message-Id: <20210301161158.227183725@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@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 6052b3c370fb82dec28bcfff6d7ec0da84ac087a ] A call to 'ausdhi6_dma_release()' to undo a previous call to 'usdhi6_dma_request()' is missing in the error handling path of the probe function. It is already present in the remove function. Fixes: 75fa9ea6e3c0 ("mmc: add a driver for the Renesas usdhi6rol0 SD/SDIO host controller") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201217210922.165340-1-christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/usdhi6rol0.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c index e2d5112d809dc..615f3d008af1e 100644 --- a/drivers/mmc/host/usdhi6rol0.c +++ b/drivers/mmc/host/usdhi6rol0.c @@ -1858,10 +1858,12 @@ static int usdhi6_probe(struct platform_device *pdev) ret = mmc_add_host(mmc); if (ret < 0) - goto e_clk_off; + goto e_release_dma; return 0; +e_release_dma: + usdhi6_dma_release(host); e_clk_off: clk_disable_unprepare(host->clk); e_free_mmc: -- 2.27.0