OSDN Git Service

mmc: uniphier-sd: Fix a resource leak in the remove function
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 20 Feb 2021 14:29:53 +0000 (15:29 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 30 Mar 2021 09:41:59 +0000 (11:41 +0200)
commite29c84857e2d51aa017ce04284b962742fb97d9e
tree240135c65f260e10c91be01983b1d50f5b4529a0
parentb03aec1c1f337dfdae44cdb0645ecac34208ae0a
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: 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>
drivers/mmc/host/uniphier-sd.c