Commit e29c8485 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Ulf Hansson
Browse files

mmc: uniphier-sd: Fix a resource leak in the remove function



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: 3fd784f7 ("mmc: uniphier-sd: add UniPhier SD/eMMC controller driver")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20210220142953.918608-1-christophe.jaillet@wanadoo.fr


Cc: stable@vger.kernel.org
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent b03aec1c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
}