linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] mmc: uniphier-sd: Fix a resource leak in the remove function
@ 2021-02-20 14:29 Christophe JAILLET
  2021-02-22 11:46 ` Masahiro Yamada
  2021-03-02 10:38 ` Ulf Hansson
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2021-02-20 14:29 UTC (permalink / raw)
  To: ulf.hansson, wsa+renesas, yoshihiro.shimoda.uh, kernel, dianders,
	yamada.masahiro, linux-arm-kernel
  Cc: kernel-janitors, Christophe JAILLET, linux-mmc, linux-kernel

A 'tmio_mmc_host_free()' call is missing in the remove function, in order
to balance a 'tmio_mmc_host_alloc()' call in the probe.
This is done in the error handling path of the probe, but not in the remove
function.

Add the missing call.

Fixes: 3fd784f745dd ("mmc: uniphier-sd: add UniPhier SD/eMMC controller driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/mmc/host/uniphier-sd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
index 6f0f05466917..ccbf9885a52b 100644
--- a/drivers/mmc/host/uniphier-sd.c
+++ b/drivers/mmc/host/uniphier-sd.c
@@ -660,6 +660,7 @@ static int uniphier_sd_remove(struct platform_device *pdev)
 
 	tmio_mmc_host_remove(host);
 	uniphier_sd_clk_disable(host);
+	tmio_mmc_host_free(host);
 
 	return 0;
 }
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] mmc: uniphier-sd: Fix a resource leak in the remove function
  2021-02-20 14:29 [PATCH 2/2] mmc: uniphier-sd: Fix a resource leak in the remove function Christophe JAILLET
@ 2021-02-22 11:46 ` Masahiro Yamada
  2021-03-02 10:38 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2021-02-22 11:46 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Ulf Hansson, kernel, kernel-janitors, Yoshihiro Shimoda,
	linux-mmc, Douglas Anderson, Linux Kernel Mailing List,
	Wolfram Sang, linux-arm-kernel

On Sat, Feb 20, 2021 at 11:31 PM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> A 'tmio_mmc_host_free()' call is missing in the remove function, in order
> to balance a 'tmio_mmc_host_alloc()' call in the probe.
> This is done in the error handling path of the probe, but not in the remove
> function.
>
> Add the missing call.
>
> Fixes: 3fd784f745dd ("mmc: uniphier-sd: add UniPhier SD/eMMC controller driver")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>


Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>


> ---
>  drivers/mmc/host/uniphier-sd.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
> index 6f0f05466917..ccbf9885a52b 100644
> --- a/drivers/mmc/host/uniphier-sd.c
> +++ b/drivers/mmc/host/uniphier-sd.c
> @@ -660,6 +660,7 @@ static int uniphier_sd_remove(struct platform_device *pdev)
>
>         tmio_mmc_host_remove(host);
>         uniphier_sd_clk_disable(host);
> +       tmio_mmc_host_free(host);
>
>         return 0;
>  }
> --
> 2.27.0
>


-- 
Best Regards
Masahiro Yamada

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] mmc: uniphier-sd: Fix a resource leak in the remove function
  2021-02-20 14:29 [PATCH 2/2] mmc: uniphier-sd: Fix a resource leak in the remove function Christophe JAILLET
  2021-02-22 11:46 ` Masahiro Yamada
@ 2021-03-02 10:38 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2021-03-02 10:38 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Wolfram Sang, Shimoda, Yoshihiro, Emil Renner Berthing,
	Doug Anderson, Masahiro Yamada, Linux ARM, linux-mmc,
	Linux Kernel Mailing List, kernel-janitors

On Sat, 20 Feb 2021 at 15:29, Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> A 'tmio_mmc_host_free()' call is missing in the remove function, in order
> to balance a 'tmio_mmc_host_alloc()' call in the probe.
> This is done in the error handling path of the probe, but not in the remove
> function.
>
> Add the missing call.
>
> Fixes: 3fd784f745dd ("mmc: uniphier-sd: add UniPhier SD/eMMC controller driver")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Applied for next and by adding a stable tag, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/uniphier-sd.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
> index 6f0f05466917..ccbf9885a52b 100644
> --- a/drivers/mmc/host/uniphier-sd.c
> +++ b/drivers/mmc/host/uniphier-sd.c
> @@ -660,6 +660,7 @@ static int uniphier_sd_remove(struct platform_device *pdev)
>
>         tmio_mmc_host_remove(host);
>         uniphier_sd_clk_disable(host);
> +       tmio_mmc_host_free(host);
>
>         return 0;
>  }
> --
> 2.27.0
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-03 17:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-20 14:29 [PATCH 2/2] mmc: uniphier-sd: Fix a resource leak in the remove function Christophe JAILLET
2021-02-22 11:46 ` Masahiro Yamada
2021-03-02 10:38 ` Ulf Hansson

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).