Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3519915pxf; Mon, 15 Mar 2021 11:22:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9rvnRTY6fND/dKlqMsBbgKaZ+9BBkMmPl1iQ3dHhUWoeRJSNPiWLzh4gqynud80eoyQ71 X-Received: by 2002:a17:907:2bd7:: with SMTP id gv23mr25417936ejc.351.1615832529387; Mon, 15 Mar 2021 11:22:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832529; cv=none; d=google.com; s=arc-20160816; b=vJCBgDOsW9liwtRuu8Q8Kqp0M4Jn18v7YtOXdwBH0fsl+MNpm74XdcYEUn96jcYtv3 1e8rEnMeQa0ZXE3pZRqEQbpLC6fpnMb8ZqLtClBIkvu/31BTo/gUkg2a2m7a3Z5UFFRj 3av2nt+KSGhoqRB5xi0qFwqtWK+InJych8m4LZAEK0JXa5ZDdKsCcpu0gHoF6WM9xZn1 tav59NfssqScGzlXu9XwDeN7gqZLu3mzE5EtsA4yApXY7no3EnxRfmrMj6FgH17L8k3w yBrprisi6P0uHdbBvD6zwHU+9fhuTak58e6xMw7nmAIiJimqvyqMyoPOXK58Tp4m7BUh gqsg== 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=psxf6BM/+4DLXsOkp/fqmskQBq7VgVp02oi3PEbsZpo=; b=efmdS4ECGfQaZrbmRhUpk5r0+FI0pXoVwhZslHjdDiO/dLcbBGTa9BkOLpxSTa3Zmd zY7Dm1oppv8vQmVbmm/s1AuRw1mXFsJKNbd1BRIgoNQJF6CoN6Ss8V4rjJZyb1ZPW5YS hHDl+DlEK7gQ1TO84RurMwI1dO1CTQTyDLJpWXg/si5kHAO6gACkl13zG60P7H8xich4 JB1EPqjBQykDwSYLW/V57CyqDLt/OcOAWpgwenMBopjHPI3cHZ+fMMLp3jzenMHjAAxe jbfwH/kEfHd4SChvD+bbtul/jqPRY0tnMM43Ju4Cddg4DGr2pSvBwXZt5POMtt2HZS+Y RxkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=z24wGXmD; 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 z16si11607433edc.65.2021.03.15.11.21.47; Mon, 15 Mar 2021 11:22:09 -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=z24wGXmD; 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 S232685AbhCOOVO (ORCPT + 99 others); Mon, 15 Mar 2021 10:21:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:34900 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232696AbhCON7d (ORCPT ); Mon, 15 Mar 2021 09:59:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C0DE964F46; Mon, 15 Mar 2021 13:59:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816750; bh=iakUUpx4G6VONJ2CRlAEqBBDWFCcmWmLRSuQ8I4Q60A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z24wGXmDq5t+hRVIsAKCF+XG59zVH5naMI/8BbRIR8OZln2kNfGztqOoWk8c4D57C r3HpcdB0CehiiZ6AifvuqsEroVgUvUMWmlWcP8c+cTQN18j64I5pcGLYqskFVBTCx2 VvG+Tv4pL9lFeori2PMfswNp6QIHq/gD15ItOH4A= 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 4.19 044/120] mmc: mxs-mmc: Fix a resource leak in an error handling path in mxs_mmc_probe() Date: Mon, 15 Mar 2021 14:56:35 +0100 Message-Id: <20210315135721.435765477@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135720.002213995@linuxfoundation.org> References: <20210315135720.002213995@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 add1e70195ea..7125687faf76 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -659,7 +659,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