mmc: sdhci-of-at91: fix memleak on clk_get failure
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Thu, 2 Jan 2020 10:42:16 +0000 (11:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Feb 2020 21:32:11 +0000 (16:32 -0500)
commit87c639a95a97355d933f56c7f4d37965e220ff54
treefdd7f17a7bacb0a73f874c0b3bc6bcddf678fd79
parent969917d2e893cb954ec10524da0fa37bd9df624b
mmc: sdhci-of-at91: fix memleak on clk_get failure

[ Upstream commit a04184ce777b46e92c2b3c93c6dcb2754cb005e1 ]

sdhci_alloc_host() does its work not using managed infrastructure, so
needs explicit free on error path. Add it where needed.

Cc: <stable@vger.kernel.org>
Fixes: bb5f8ea4d514 ("mmc: sdhci-of-at91: introduce driver for the Atmel SDMMC")
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/b2a44d5be2e06ff075f32477e466598bb0f07b36.1577961679.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/host/sdhci-of-at91.c