]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 13 Mar 2020 05:19:20 +0000 (01:19 -0400)
commit1d3e1f934db000b043179ee234fb94325dcc9a06
tree29d8b2bef28f30966752d2eebba8801dcd2cd888
parent68911c52e04277eb9224a7b70045a98823c67a95
mmc: sdhci-of-at91: fix memleak on clk_get failure

BugLink: https://bugs.launchpad.net/bugs/1867051
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/mmc/host/sdhci-of-at91.c