linux/drivers/mmc/host
Yang Yingliang 29276d56f6 mmc: wmt-sdmmc: fix return value check of mmc_add_host()
mmc_add_host() may return error, if we ignore its return value, the memory
that allocated in mmc_alloc_host() will be leaked and it will lead a kernel
crash because of deleting not added device in the remove path.

So fix this by checking the return value and goto error path which will call
mmc_free_host(), besides, clk_disable_unprepare() also needs be called.

Fixes: 3a96dff0f8 ("mmc: SD/MMC Host Controller for Wondermedia WM8505/WM8650")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221101063023.1664968-10-yangyingliang@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2022-12-07 13:22:35 +01:00
..
alcor.c mmc: alcor: fix return value check of mmc_add_host() 2022-12-07 13:22:34 +01:00
atmel-mci.c
au1xmmc.c mmc: au1xmmc: Replace kmap_atomic() with kmap_local_page() 2022-12-07 13:22:33 +01:00
bcm2835.c mmc: bcm2835: Replace kmap_atomic() with kmap_local_page() 2022-12-07 13:22:32 +01:00
cavium-octeon.c mmc: cavium-octeon: Add of_node_put() when breaking out of loop 2022-07-21 18:02:55 +02:00
cavium-thunderx.c mmc: cavium-thunderx: Add of_node_put() when breaking out of loop 2022-07-21 18:03:08 +02:00
cavium.c
cavium.h
cb710-mmc.c
cb710-mmc.h
cqhci-core.c
cqhci-crypto.c
cqhci-crypto.h
cqhci.h
davinci_mmc.c
dw_mmc-bluefield.c
dw_mmc-exynos.c
dw_mmc-exynos.h
dw_mmc-hi3798cv200.c
dw_mmc-k3.c
dw_mmc-pci.c
dw_mmc-pltfm.c
dw_mmc-pltfm.h
dw_mmc-rockchip.c
dw_mmc.c mmc: host: Fix repeated words in comments 2022-12-07 13:22:33 +01:00
dw_mmc.h
jz4740_mmc.c mmc: jz4740_mmc: Fix error check for dma_map_sg 2022-09-14 11:53:47 +02:00
Kconfig mmc: sdhci-brcmstb: Allow building with COMPILE_TEST 2022-12-07 13:22:33 +01:00
litex_mmc.c
Makefile
meson-gx-mmc.c mmc: meson-gx: add SDIO interrupt support 2022-09-14 11:53:48 +02:00
meson-mx-sdhc-clkc.c
meson-mx-sdhc-mmc.c mmc: meson-mx-sdhc: Fix error check for dma_map_sg 2022-09-14 11:53:47 +02:00
meson-mx-sdhc.h
meson-mx-sdio.c
mmc_hsq.c mmc: hsq: Fix data stomping during mmc recovery 2022-09-27 12:38:29 +02:00
mmc_hsq.h
mmc_spi.c
mmci.c
mmci.h
mmci_qcom_dml.c
mmci_stm32_sdmmc.c
moxart-mmc.c mmc: moxart: fix return value check of mmc_add_host() 2022-12-07 13:22:34 +01:00
mtk-sd.c mmc: mtk-sd: add Inline Crypto Engine clock control 2022-12-07 13:22:34 +01:00
mvsdio.c
mvsdio.h
mxcmmc.c mmc: mxcmmc: fix return value check of mmc_add_host() 2022-12-07 13:22:34 +01:00
mxs-mmc.c
of_mmc_spi.c
omap.c
omap_hsmmc.c
owl-mmc.c
pxamci.c mmc: pxamci: fix return value check of mmc_add_host() 2022-12-07 13:22:34 +01:00
pxamci.h
renesas_sdhi.h mmc: renesas_sdhi: newer SoCs don't need manual tap correction 2022-07-21 18:03:41 +02:00
renesas_sdhi_core.c mmc: renesas_sdhi: Fix rounding errors 2022-10-07 10:53:22 +02:00
renesas_sdhi_internal_dmac.c mmc: renesas_sdhi: newer SoCs don't need manual tap correction 2022-07-21 18:03:41 +02:00
renesas_sdhi_sys_dmac.c mmc: tmio_mmc_core: Remove local_irq_{save,restore}() around k[un]map_atomic() 2022-12-07 13:22:33 +01:00
rtsx_pci_sdmmc.c mmc: rtsx_pci: fix return value check of mmc_add_host() 2022-12-07 13:22:34 +01:00
rtsx_usb_sdmmc.c mmc: rtsx_usb_sdmmc: fix return value check of mmc_add_host() 2022-12-07 13:22:34 +01:00
s3cmci.c
s3cmci.h
sdhci-acpi.c mmc: Remove duplicate words in comments 2022-12-07 13:22:34 +01:00
sdhci-bcm-kona.c mmc: Remove duplicate words in comments 2022-12-07 13:22:34 +01:00
sdhci-brcmstb.c mmc: sdhci-brcmstb: Fix SDHCI_RESET_ALL for CQHCI 2022-11-07 13:33:09 +01:00
sdhci-cadence.c
sdhci-cns3xxx.c
sdhci-cqhci.h mmc: cqhci: Provide helper for resetting both SDHCI and CQHCI 2022-11-07 13:28:47 +01:00
sdhci-dove.c
sdhci-esdhc-imx.c mmc: sdhci-esdhc-imx: reset the tuning logic before execute tuning 2022-12-07 13:22:33 +01:00
sdhci-esdhc-mcf.c
sdhci-esdhc.h
sdhci-iproc.c
sdhci-milbeaut.c
sdhci-msm.c mmc: sdhci-*: Convert drivers to new sdhci_and_cqhci_reset() 2022-12-07 13:22:33 +01:00
sdhci-of-arasan.c mmc: sdhci-of-arasan: Add support for dynamic configuration 2022-12-07 13:22:33 +01:00
sdhci-of-aspeed-test.c
sdhci-of-aspeed.c
sdhci-of-at91.c
sdhci-of-dwcmshc.c mmc: sdhci-of-dwcmshc: Re-enable support for the BlueField-3 SoC 2022-08-15 19:31:04 +02:00
sdhci-of-esdhc.c
sdhci-of-hlwd.c
sdhci-of-sparx5.c
sdhci-omap.c mmc: Remove duplicate words in comments 2022-12-07 13:22:34 +01:00
sdhci-pci-arasan.c
sdhci-pci-core.c mmc: sdhci-pci: Set PROBE_PREFER_ASYNCHRONOUS 2022-12-07 13:22:34 +01:00
sdhci-pci-dwc-mshc.c
sdhci-pci-gli.c mmc: sdhci-*: Convert drivers to new sdhci_and_cqhci_reset() 2022-12-07 13:22:33 +01:00
sdhci-pci-o2micro.c mmc: sdhci-pci-o2micro: fix card detect fail issue caused by CD# debounce timeout 2022-11-16 13:58:55 +01:00
sdhci-pci.h
sdhci-pic32.c
sdhci-pltfm.c
sdhci-pltfm.h
sdhci-pxav2.c
sdhci-pxav3.c
sdhci-s3c.c
sdhci-spear.c
sdhci-sprd.c mmc: sdhci-sprd: Fix no reset data and command after voltage switch 2022-12-01 11:28:39 +01:00
sdhci-st.c
sdhci-tegra.c mmc: sdhci-tegra: Fix SDHCI_RESET_ALL for CQHCI 2022-11-07 13:33:38 +01:00
sdhci-xenon-phy.c
sdhci-xenon.c
sdhci-xenon.h
sdhci.c mmc: sdhci: Replace kmap_atomic() with kmap_local_page() 2022-12-07 13:22:32 +01:00
sdhci.h mmc: Remove duplicate words in comments 2022-12-07 13:22:34 +01:00
sdhci_am654.c mmc: sdhci_am654: Use dev_err_probe() for mmc_of_parse() return code 2022-12-07 13:22:34 +01:00
sdhci_f_sdh30.c
sdhci_f_sdh30.h
sdricoh_cs.c
sh_mmcif.c
sunxi-mmc.c
tifm_sd.c mmc: tifm_sd: Replace kmap_atomic() with kmap_local_page() 2022-12-07 13:22:32 +01:00
tmio_mmc.c
tmio_mmc.h mmc: tmio_mmc_core: Replace kmap_atomic() with kmap_local_page() 2022-12-07 13:22:33 +01:00
tmio_mmc_core.c mmc: tmio_mmc_core: Remove local_irq_{save,restore}() around k[un]map_atomic() 2022-12-07 13:22:33 +01:00
toshsd.c mmc: toshsd: fix return value check of mmc_add_host() 2022-12-07 13:22:34 +01:00
toshsd.h
uniphier-sd.c
usdhi6rol0.c
ushc.c
via-sdmmc.c
vub300.c mmc: vub300: fix return value check of mmc_add_host() 2022-12-07 13:22:35 +01:00
wbsd.c mmc: wbsd: Replace kmap_atomic() with kmap_local_page() 2022-12-07 13:22:33 +01:00
wbsd.h
wmt-sdmmc.c mmc: wmt-sdmmc: fix return value check of mmc_add_host() 2022-12-07 13:22:35 +01:00