mmc: sdhci-sprd: Fix some resource leaks in the remove function
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 17 Dec 2020 20:42:36 +0000 (21:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:38:02 +0000 (11:38 +0100)
commit25975632869bc576ada12953e59c9cc7f6ea8253
tree1e432c5365a69e91105177c3fbf2357f02f20031
parent34251b82747104bf7e1a9492d6f206d933900ccb
mmc: sdhci-sprd: Fix some resource leaks in the remove function

[ Upstream commit c9c256a8b0dc09c305c409d6264cc016af2ba38d ]

'sdhci_remove_host()' and 'sdhci_pltfm_free()' should be used in place of
'mmc_remove_host()' and 'mmc_free_host()'.

This avoids some resource leaks, is more in line with the error handling
path of the probe function, and is more consistent with other drivers.

Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Orson Zhai <orson.zhai@gmail.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20201217204236.163446-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/host/sdhci-sprd.c