From: Chaotian Jing <chaotian.jing@mediatek.com>
To: Zheng Liang <zhengliang6@huawei.com>
Cc: ulf.hansson@linaro.org, wenbin.mei@mediatek.com,
linux-mmc@vger.kernel.org, linux-mediatek@lists.infradead.org,
fangwei1@huawei.com, matthias.bgg@gmail.com, wangli74@huawei.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mmc: mediatek: fix mem leak in msdc_drv_probe
Date: Thu, 12 Nov 2020 16:51:59 +0800 [thread overview]
Message-ID: <1605171119.29266.1.camel@mhfsdcap03> (raw)
In-Reply-To: <20201112092530.32446-1-zhengliang6@huawei.com>
On Thu, 2020-11-12 at 17:25 +0800, Zheng Liang wrote:
> It should use mmc_free_host to free mem in error patch of
> msdc_drv_probe.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zheng Liang <zhengliang6@huawei.com>
Reviewed-by: Chaotian Jing <chaotian.jing@mediatek.com>
> ---
> drivers/mmc/host/mtk-sd.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> index fc5ee5df91ad..eac7838e2dac 100644
> --- a/drivers/mmc/host/mtk-sd.c
> +++ b/drivers/mmc/host/mtk-sd.c
> @@ -2504,8 +2504,10 @@ static int msdc_drv_probe(struct platform_device *pdev)
>
> host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
> "hrst");
> - if (IS_ERR(host->reset))
> - return PTR_ERR(host->reset);
> + if (IS_ERR(host->reset)) {
> + ret = PTR_ERR(host->reset);
> + goto host_free;
> + }
>
> host->irq = platform_get_irq(pdev, 0);
> if (host->irq < 0) {
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-11-12 9:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 9:25 [PATCH] mmc: mediatek: fix mem leak in msdc_drv_probe Zheng Liang
2020-11-12 8:51 ` Chaotian Jing [this message]
2020-11-17 11:50 ` Ulf Hansson
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=1605171119.29266.1.camel@mhfsdcap03 \
--to=chaotian.jing@mediatek.com \
--cc=fangwei1@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=ulf.hansson@linaro.org \
--cc=wangli74@huawei.com \
--cc=wenbin.mei@mediatek.com \
--cc=zhengliang6@huawei.com \
/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).