Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp958158pxb; Wed, 3 Mar 2021 22:31:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJw77OuQcC3OUrHXknsCJNdKUD/OdoadVmd01deztJQbohlyKlkENFD0ncFU+UX8yQTT316b X-Received: by 2002:a17:906:3f96:: with SMTP id b22mr2527885ejj.478.1614839476681; Wed, 03 Mar 2021 22:31:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614839476; cv=none; d=google.com; s=arc-20160816; b=01kzKEP7dATdOL81JcAz6jptv4nhLlD53JjfufkNY8AnQu8OZ/Cxr2DwWpq7WnW5lW E4ENV7Ne38c8b4eQCiKy/t4/3Oy2Yqo8s5fIkccIZBxZR4IPskwPfAI7y7DJE33bi23j Vmx7Nz2tQXza4q1HqKIvnW6Cxgyu/G7RaloQbrswJADbEEBTXNF+teR38Lh1jYGhlQJ8 aadRaywA3sHOxzoXwPHNqV9eKHHywBJxpFdqNALQerX2/w6gsleLtglvff7mDniCNSLJ 6wmlj4LA2Ve9ktS2iZHDL/9bpxZL8gosfd+ed6+pzGbCJPck7oJkXFH5xHnpBK7k3lI7 Z+ow== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=GND0nkF1tAiZ5AJO+cXGUjNPn0fNazhoeUCjtDxUnPA=; b=rE9epdYwgGrcyhpWO9COOhPOOo7eDsj+cqB7k5VLkDYB48FZ1pI8sKLjLGFZrkmWVh H2JH9ngeO96a+CzXmhRAM/EjuD0z6oJO9PxqZHOGeKkUXlzdh526+J1UkmD6FmjLybqw Tm7o7fs03reeDlsEpFb86n6ftGx4fuSfOncETrNvg1gX92CNLt0MREcau9AEmCciPk4J 9SWJ+UQi268Cgs9/zqFwD73RJyR2vGwCb4gdJCKlwrWCgGTwLTVSbprHkaQMrgLTLMFT V57rQayOgzJo/hFXJbDi19Ovde+K9RE6uuiI9llvsziSjkQF7qJZEYmT4FbRwCbC6NTF aOjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Rqi1eerS; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g3si4802738edp.527.2021.03.03.22.30.54; Wed, 03 Mar 2021 22:31:16 -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=@kernel.org header.s=k20201202 header.b=Rqi1eerS; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1579645AbhCBQ71 (ORCPT + 99 others); Tue, 2 Mar 2021 11:59:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:45606 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351402AbhCBOWg (ORCPT ); Tue, 2 Mar 2021 09:22:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6960464FCD; Tue, 2 Mar 2021 11:59:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614686378; bh=XQ2zSEW/W21CTzIhc5QdKoiwCXhCc8zccWUX161ff7M=; h=From:To:Cc:Subject:Date:From; b=Rqi1eerSfWOqcYuuYkcpBKEdWaaavIA7i5Dx++//HkotRIvfUhsnOBPvN6me+w1fM S//vcK7HXurtBjgPjaD/AnYbGzTrweB4lAzBe8gXh5cTwGpR6zDgzZSz3KOb0zWyBq CYeM87bHgzNPvCZC30i3v4kjfRBSfk0iZy8xQbbGrBSU5KfCxB/x6vMXosXnd+2sgR y4zHDbmF7F9yLKD8nas19XBMlYFdXAr4kJ669Oi7hXH0e3SxzjJR+vlHv21FfNPtVK bF1wGTBgTVWYFFnHLE1u4jx0IAPEfmmFywTcIQ8DfMpFtvghCzpXnVQ2i9yVwaLvvT dh6+NAUpOgdiQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Christophe JAILLET , Ulf Hansson , Sasha Levin , linux-mmc@vger.kernel.org Subject: [PATCH AUTOSEL 4.4 1/8] mmc: mxs-mmc: Fix a resource leak in an error handling path in 'mxs_mmc_probe()' Date: Tue, 2 Mar 2021 06:59:28 -0500 Message-Id: <20210302115935.63777-1-sashal@kernel.org> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 c8b8ac66ff7e..687fd68fbbcd 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -651,7 +651,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