Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1150839rwi; Wed, 19 Oct 2022 07:17:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6v7yHKdrPgO+QxxDGAw2/JNzOBJHu3bVVsJgHz5VG4NVQqFFtkoQSb/h+rn5aoZ+1+81TV X-Received: by 2002:a05:6402:28a1:b0:458:81c0:a379 with SMTP id eg33-20020a05640228a100b0045881c0a379mr7693557edb.388.1666189040540; Wed, 19 Oct 2022 07:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666189040; cv=none; d=google.com; s=arc-20160816; b=baiOrdq3GC0V2b5Rt3fYBrsVQsfbnpaswObWE1B/Gry7BpiuNcLtPCdhYwg4zsasfh 89kKOLvHmAfmr9tYBhJu9J33QevPluZ1S76In55hEd+dZ1RHuBdem+xG71pIZwYneOx3 dTdI89YNUqh0GBcL0/tjAk6mONiGk/NQgqmZd+8xRmH3tDIaQI41twVB27zL3TmgNYxq qGUrn69CTYxYocjTkhu1QfaxZ1PTlyTnMII2PrjRIPMAiPgcLZdJaUivO4JQmhfgg7g1 riZrW0o6Lii+gxfq/NpY3U6JlredKUQsiaD7KvA8TVbViOloFY8HLloIMNAz4Ayh4hsm elMg== 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=QJQp++MzUms/1JVp2+81Qm4114iR+ppLOFcZgdXVtis=; b=e9lNr+H1z+TBY4qPt9flhsBUy54Qfh7ytYkFhy/TOBPvEW2s6uyzu5hBpbjdNjCzvU WX5Tmxg/VyhHdnvrdPl3tWHsX3MXnsnjm+ZluyhgtKe53SLBofttilgh0iYORnzZbqBo lnVs30OdoyfqNpn0WjaUzTj1oH5sH1gU7ZhIZQKovvmsgPNMhyCqbuCDyqkYWe8H2nYn CIqFQboBgjBv/9xXAs0iW2Du6I/HhPuHcuhYOIxshR9wtFSMkG/xbTD/hqOWiuPoxaIL 5PH2J2FBoPMZ5Bh19mSxcXOJgiP20opGZhQgEljpYn/QCO9ryHbN9jBtt2WZZeWuxdaB bYtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=L3jvUQLp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g14-20020a1709065d0e00b0078219af8361si13662319ejt.883.2022.10.19.07.16.54; Wed, 19 Oct 2022 07:17:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=L3jvUQLp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231844AbiJSN6i (ORCPT + 99 others); Wed, 19 Oct 2022 09:58:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234044AbiJSNyk (ORCPT ); Wed, 19 Oct 2022 09:54:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E433F132DD5; Wed, 19 Oct 2022 06:37:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9C427B823FB; Wed, 19 Oct 2022 08:56:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F5CFC433C1; Wed, 19 Oct 2022 08:56:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169779; bh=HHebO/JQrjiVOVr4n+bmDjcuNofUzDO5209bu/y3qb8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L3jvUQLpR7Xl54flkM3dZjrg4z8itK7c2CJ4K+JzVJd+At7v4CFN2HV+qgf6U4tzI 2mN9avwKmbmuWMZvVVQOf/SUZFN4EcWNL40Z3H47ldEv6PsYcc4tinVX+MUbLwHeLB jlap0cgdDVsrNvd/bRBrGC/mFBOlL1ppq0otGoyA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Dan Carpenter , Ulf Hansson , Sasha Levin Subject: [PATCH 6.0 404/862] mmc: wmt-sdmmc: Fix an error handling path in wmt_mci_probe() Date: Wed, 19 Oct 2022 10:28:11 +0200 Message-Id: <20221019083307.789744074@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET [ Upstream commit cb58188ad90a61784a56a64f5107faaf2ad323e7 ] A dma_free_coherent() call is missing in the error handling path of the probe, as already done in the remove function. Fixes: 3a96dff0f828 ("mmc: SD/MMC Host Controller for Wondermedia WM8505/WM8650") Signed-off-by: Christophe JAILLET Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/53fc6ffa5d1c428fefeae7d313cf4a669c3a1e98.1663873255.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/wmt-sdmmc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c index 163ac9df8cca..9b5c503e3a3f 100644 --- a/drivers/mmc/host/wmt-sdmmc.c +++ b/drivers/mmc/host/wmt-sdmmc.c @@ -846,7 +846,7 @@ static int wmt_mci_probe(struct platform_device *pdev) if (IS_ERR(priv->clk_sdmmc)) { dev_err(&pdev->dev, "Error getting clock\n"); ret = PTR_ERR(priv->clk_sdmmc); - goto fail5; + goto fail5_and_a_half; } ret = clk_prepare_enable(priv->clk_sdmmc); @@ -863,6 +863,9 @@ static int wmt_mci_probe(struct platform_device *pdev) return 0; fail6: clk_put(priv->clk_sdmmc); +fail5_and_a_half: + dma_free_coherent(&pdev->dev, mmc->max_blk_count * 16, + priv->dma_desc_buffer, priv->dma_desc_device_addr); fail5: free_irq(dma_irq, priv); fail4: -- 2.35.1