Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3515492pxf; Mon, 15 Mar 2021 11:15:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlJRAoQchmMC32pwdF5JJXE2rV+lJYS8pmrZO6F08QZYQ/iE3LAqwWrRxpzmeX+ewhhbz8 X-Received: by 2002:a05:6402:b2d:: with SMTP id bo13mr31190625edb.120.1615832124509; Mon, 15 Mar 2021 11:15:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832124; cv=none; d=google.com; s=arc-20160816; b=h3eUjsjG+grnT/x10IawAkgROjbW9HHkF9LuIIntfUodd073mGdlF2r17He0iUdsAe KhksqHQzsv7TI3wYQPOWBP+9tJxj88U2QG41n4oe6zN3FYAYzucErmBGZHcjYy0hQX6u RN7zjlPwy79e3sAAzFcF0AEWpe2oqbeEz4/ldw8nlCwJHMCYka2HjHF6lmA6jRY2WIH3 vmDLB9lH8QNsjqe6jVTf19UwTFxbQ57eL/ZZTGBZlyOuv7+P82Jgpt0h7X8CnwWL0gvh iFcOGD2MXUAtnLT2z8Eq+/jG9RdAFb6YN/j/CvsAr9UMQ7/c8SjK6GK6RB+IkaUDvQFC KL8Q== 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=CYjoHyMj0Hjnqvk886yyoOLJ3FcISQ7vhqG0DPYRrqo=; b=PB1l4Vj5m5NKe3RN+ru8O8a6uotzqbdyCnzXjiAXQuXdkeSG3xFPcMpPsVprdXkRP1 hPyFe1PNNqnLmA5lLK62KT5861aBtCE9GO1nxhXzkx7W4nSpcxPKtNjKC9C7KXXAuX0K EjMuKgosvWtLhVxN+CUCMILevFXAOVJIqqUbFosGn0LFG5nixNWUtgiVmBDpZnoKByck p7z2vwYXCijXDLckp6C+J8W2sbIuLh8JenVSAmciyJnZVJp3JcP2BMITZ/i0uhtKgjC0 hUS21yzF1O0pPA+fGo5QVI0SGWWgfodKD4zGfXcrCcHHuw9m8BHwbcaOSESj0QzcSc8p 7lQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SuaZT3jT; 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 b65si12547416edf.391.2021.03.15.11.15.02; Mon, 15 Mar 2021 11:15:24 -0700 (PDT) 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=SuaZT3jT; 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 S236315AbhCOOMq (ORCPT + 99 others); Mon, 15 Mar 2021 10:12:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:36788 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232458AbhCON65 (ORCPT ); Mon, 15 Mar 2021 09:58:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0CFC764F8F; Mon, 15 Mar 2021 13:58:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816718; bh=NJW+Z3A2EiLMmJFmj2/kcTY/qNzUzVEfcbQQ6+ODFck=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SuaZT3jTfWavG5+v++cuMvwZSUYebZvDMN3zxBh9E/XYye05jKWySPKyH+iC8dJxP LusKLIAK7kCDoy4KYBCDDcsMlGLpm4oPvbweCcTklUkmf9LJPmQ1bO4v9bro8gTY72 Rhg6Ayg5rskb+iY6b+tFueSULzeAn0VqtzEuYvpo= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Ulf Hansson , Sasha Levin Subject: [PATCH 5.4 065/168] mmc: mxs-mmc: Fix a resource leak in an error handling path in mxs_mmc_probe() Date: Mon, 15 Mar 2021 14:54:57 +0100 Message-Id: <20210315135552.505642524@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135550.333963635@linuxfoundation.org> References: <20210315135550.333963635@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: Greg Kroah-Hartman From: Christophe JAILLET [ Upstream commit 0bb7e560f821c7770973a94e346654c4bdccd42c ] If 'mmc_of_parse()' fails, we must undo the previous 'dma_request_chan()' call. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201208203527.49262-1-christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/mxs-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 4031217d21c3..52054931c350 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -644,7 +644,7 @@ static int mxs_mmc_probe(struct platform_device *pdev) ret = mmc_of_parse(mmc); if (ret) - goto out_clk_disable; + goto out_free_dma; mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; -- 2.30.1