Thread (3 messages) 3 messages, 3 authors, 2020-11-17

Re: [PATCH] mmc: mediatek: fix mem leak in msdc_drv_probe

From: Ulf Hansson <hidden>
Date: 2020-11-17 11:51:57
Also in: linux-mediatek, linux-mmc

On Thu, 12 Nov 2020 at 09:27, Zheng Liang [off-list ref] wrote:
It should use mmc_free_host to free mem in error patch of
msdc_drv_probe.

Reported-by: Hulk Robot <redacted>
Signed-off-by: Zheng Liang <redacted>
Applied for next, thanks!

Kind regards
Uffe

quoted hunk ↗ jump to hunk
---
 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) {
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help