diff options
| author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2021-02-20 15:29:53 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-11 14:04:02 +0200 |
| commit | 0d8941b9b2d3e7b3481fdf43b1a6189d162175b7 (patch) | |
| tree | b515a43803dcee713b8c3522160efc2fc192077d /drivers/mmc | |
| parent | 06e48bb631d38215b2c1ccb05930fc97d55fe6e6 (diff) | |
| download | linux-0d8941b9b2d3e7b3481fdf43b1a6189d162175b7.tar.gz linux-0d8941b9b2d3e7b3481fdf43b1a6189d162175b7.tar.bz2 linux-0d8941b9b2d3e7b3481fdf43b1a6189d162175b7.zip | |
mmc: uniphier-sd: Fix a resource leak in the remove function
commit e29c84857e2d51aa017ce04284b962742fb97d9e upstream.
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>
Link: https://lore.kernel.org/r/20210220142953.918608-1-christophe.jaillet@wanadoo.fr
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mmc')
| -rw-r--r-- | drivers/mmc/host/uniphier-sd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c index ec59bef22daa..b2e28ecae4a5 100644 --- a/drivers/mmc/host/uniphier-sd.c +++ b/drivers/mmc/host/uniphier-sd.c @@ -664,6 +664,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; } |
