From: Ulf Hansson <ulf.hansson@linaro.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: cjb@laptop.org, dan.carpenter@oracle.com,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org
Subject: Re: [PATCH v2] mmc: wmt-sdmmc: Fix an error handling path in wmt_mci_probe()
Date: Tue, 27 Sep 2022 14:13:39 +0200 [thread overview]
Message-ID: <CAPDyKFrLvXhnEgx5JjvnUnrTWsAid-2Wvgj3ypEU5AetkT+6JQ@mail.gmail.com> (raw)
In-Reply-To: <53fc6ffa5d1c428fefeae7d313cf4a669c3a1e98.1663873255.git.christophe.jaillet@wanadoo.fr>
On Thu, 22 Sept 2022 at 21:06, Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> 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 <christophe.jaillet@wanadoo.fr>
Applied for next, thanks!
Kind regards
Uffe
> ---
> Changes since v1:
> * Add and use the (ugly named) 'fail5_and_a_half' label [Dan Carpenter <dan.carpenter@oracle.com>]
>
> v1: https://lore.kernel.org/all/bf2e2e69226b20d173cce66287f59488fd47474b.1646588375.git.christophe.jaillet@wanadoo.fr/
> ---
> 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.34.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2022-09-27 12:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 19:06 [PATCH v2] mmc: wmt-sdmmc: Fix an error handling path in wmt_mci_probe() Christophe JAILLET
2022-09-23 9:09 ` Dan Carpenter
2022-09-27 12:13 ` Ulf Hansson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPDyKFrLvXhnEgx5JjvnUnrTWsAid-2Wvgj3ypEU5AetkT+6JQ@mail.gmail.com \
--to=ulf.hansson@linaro.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=cjb@laptop.org \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).