Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3523190pxf; Mon, 15 Mar 2021 11:27:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoT9igpgBLxhucxSPXRwI5fWluy1bv/4HsNZOyB077ms6U3Eu9I4vcutkCcAK+8U6lsP8o X-Received: by 2002:a17:906:5acd:: with SMTP id x13mr24962394ejs.211.1615832832353; Mon, 15 Mar 2021 11:27:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832832; cv=none; d=google.com; s=arc-20160816; b=KPgWVeQG/kgfl6PqYMYH3+PFIuoVHtcU4ctqNVqVaEcbd6hx1GSFId/Vg7TMh4eVV6 PenMy7RNly2qeGfQj4PPD5cKvlMnvqI1gIDo8VVNQB7Nw2h0Yrde5oV5vb/S+37uuTXI kb1OTCGv8C+xpXOE6vrQTRRJLtWX8PYqgI41NQf5bI3PAb2qaGCYa7XMoOlvVqcchaVu qyX4qOHrbOh91RajMGyxn5zcOmzyuB4zyXE3P7cWs6b1ir/OkpiYobIIcvQ2s+q9SNZx +0p2y/wNxbgrZRP6KB4rxxSOcnUckkBSR2iXw6mX4aGSzXpcl7dvsbU9Hn2OUp6ohJNv KeeQ== 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=+mZwGawC3TW1tpThPfy2EQtJ1Qi6MVOTO12c/UoMGGg=; b=SOkSL4hrY/ToQTaPDXlbmxG5o+E/InfcL4VKAOUzagc4+YcvIIHysvy5W9UGjm3+cD NquSMLvUP0FRJPJ4d55pCQtmoj6y76oHZz7wKgHgrudGyF1QzYjO9ZBdIEoVRfxv5Jf6 FlrRsW9tw7/CjgAa2LA1uJkAasnjxLP4t14R9d+YDFMOvlaC7SiAz4V56S/wgVjt5VfD AKSNnvzAQuv6sADYnvodU9K76yKhFCFrWV+d+ZLEG0wv26IIrBQ8465cvDfodZrbP58L ayGXD2GF0Dsj3eMv7y5c579ZZdcEbaEO6fklGjYrcPsykZENuBpDoyYI3PY9qcIWQy36 qz6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YAW1KbIg; 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 w26si11536638edx.572.2021.03.15.11.26.46; Mon, 15 Mar 2021 11:27:12 -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=YAW1KbIg; 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 S239026AbhCOO1h (ORCPT + 99 others); Mon, 15 Mar 2021 10:27:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:37540 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233102AbhCOOAj (ORCPT ); Mon, 15 Mar 2021 10:00:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 845C364F44; Mon, 15 Mar 2021 14:00:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816826; bh=riBP4cCMfjoDZkOhUYUpGao3Je2K4TW0wlX8Sj6xuls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YAW1KbIgTIqitr5zw5iV6YKfIDxLYYJ64p8p2Xdm3Flx3pbdKf8lqxRJbea0rsoU0 DrPIzCZ4qqRP4gaAmhou+x+traSLUVVqHLwQzbUfFFx6y4Jvo8RMM1gA966VWlZIoY TCt6IZ+PyGbmJpK+suZe4AqVx+mt2GUBfiHmH7Hk= 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.10 136/290] mmc: mxs-mmc: Fix a resource leak in an error handling path in mxs_mmc_probe() Date: Mon, 15 Mar 2021 14:53:49 +0100 Message-Id: <20210315135546.508552356@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@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 75007f61df97..4fbbff03137c 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -643,7 +643,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