Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp399457pxb; Wed, 3 Mar 2021 06:13:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnaZlR6w1KnQcxgpLpStRjq7R20ySqWvaOBM9HaPcm+wRQVg0TKp3z3rTq7d76IsujPSIx X-Received: by 2002:aa7:db15:: with SMTP id t21mr19923516eds.145.1614780784064; Wed, 03 Mar 2021 06:13:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614780784; cv=none; d=google.com; s=arc-20160816; b=a/Lla/AKoiSNN0L4bO57yI8aBhycFqYRcGPMiPzq3kKXNmYDU1JVt4VS6FEmbd9h4Y xyVxwrbM+cWSYGIByp2m05mAB+WQwIlv32kFwqbwt99p9P8JLhTFiYheKsureeE0EESx YuU6lDhx8gyyZatEgoNeejKPX330mtqwQKWGP0E179cUolDXUeWTQpUiaDCqg8FGi7/5 E7YXDcESiLNr4c5lMQGige8Tr9L79sKoUPGCAk/PrOw7vAYJg8BCuv0thGvL1GRk4i65 ylPlyIutSWjMypeiWg5SJYEpryiyYkFO4ntXXK1fk0dIJtSaOPraDwe6YWSq0VTOtVhj +lAw== 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=u/PSU943EzOAuxdchpwAZwK9TxSWbDnLhTJUrY40fSw=; b=ZB94i0ZbwpMUIQHHuPDN00JYpMWUmF9lo75D4UlUQasC2HQjS438PUxMCuwJItBijB D0Ybrhcaj0g8x+XJI26Ucc7WtLasr6+gGyHZZNpxECkNqCAg0pjQgHUW+020yiNJZk+c Lv+SpmD2Iq6dTBpg/LDMM4OcNn8xdwJfv9ohBDFt51T/VkZJ/ULVhGHrqL/nAEYZ7R2R 2pkDx3rUlDbgNwNMFvudg+rmlLJuZKFamLV0CnQz51O88qz28RvOj8mI0xULYg2HzN8l jOk5Zgx3V722u0ZGIWNCCQIq6LZOwu6ibQPCh4D/Ldu6FmXzTheO3/gWs2fBdNgsk/jC d3mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zcO+Rry2; 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 e19si15876463ejx.680.2021.03.03.06.12.15; Wed, 03 Mar 2021 06:13:04 -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=zcO+Rry2; 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 S243528AbhCAUmJ (ORCPT + 99 others); Mon, 1 Mar 2021 15:42:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:36352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234508AbhCARI3 (ORCPT ); Mon, 1 Mar 2021 12:08:29 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B45886500F; Mon, 1 Mar 2021 16:41:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614616903; bh=s149aqb6iXt6XrArp6AMD3zXyGpQXNZHWq+ZGI8l3cI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zcO+Rry2TWbqLdJeGWMsp805DjQf7fpll1Sxfy3q0F1q/p/TCt/rR5+h4+ejnb/eN M6ovCfslreqB5GdZEFM0GggaXPN7hRuXYkQCDSiUM/Bdt+dd6ulHKOidEc/bg+zRS6 BhP/BFVlrlacrCB1zJ3ii940G28L/L7jNokRSv8I= 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 4.19 135/247] mmc: usdhi6rol0: Fix a resource leak in the error handling path of the probe Date: Mon, 1 Mar 2021 17:12:35 +0100 Message-Id: <20210301161038.276910649@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@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 cdfeb15b6f051..ef3aa8b520787 100644 --- a/drivers/mmc/host/usdhi6rol0.c +++ b/drivers/mmc/host/usdhi6rol0.c @@ -1866,10 +1866,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