linux/drivers/mmc/host
Myeonghun Pak 4396d70bb7 mmc: sdhci-of-aspeed: Remove children before releasing SDC resources
Probe failure and removal leave SDHCI child devices registered after the
parent clock and managed resources are released.

Unregister the OF children in reverse order before disabling the parent
clock on both paths. Use of_platform_device_destroy() because manual
child creation does not set the flag required by of_platform_depopulate().

This issue was identified during our ongoing static-analysis research
while reviewing kernel code.

Fixes: bb7b8ec62d ("mmc: sdhci-of-aspeed: Add support for the ASPEED SD controller")
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Assisted-by: OpenAI:GPT-5.6
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-09-14 12:04:29 +02:00
..
alcor.c mmc: host: Remove redundant dev_err()/dev_err_probe() 2026-07-27 16:57:43 +02:00
atmel-mci.c mmc: atmel-mci: Fix use-after-free in atmci_remove due to race condition 2026-08-04 15:05:39 +02:00
au1xmmc.c mmc: au1xmmc: use modern PM macros 2025-08-22 12:14:03 +02:00
bcm2835.c mmc: bcm2835: DMA mapping improvements 2026-07-16 15:17:03 +02:00
cavium-octeon.c mmc: host: Remove redundant dev_err()/dev_err_probe() 2026-07-27 16:57:43 +02:00
cavium-thunderx.c mmc: host: Move MODULE_DEVICE_TABLE next to the table itself 2026-05-11 16:59:24 +02:00
cavium.c mmc: cavium: Use clamp to simplify cvm_mmc_set_clock 2026-02-23 12:06:53 +01:00
cavium.h
cb710-mmc.c mmc: cb710-mmc: use modern PM macros 2025-08-22 12:14:03 +02:00
cb710-mmc.h mmc: Convert from tasklet to BH workqueue 2024-07-08 11:41:30 +02:00
cqhci-core.c mmc: cqhci: fix to missed endian conversions 2026-07-06 16:27:23 +02:00
cqhci-crypto.c blk-crypto: add basic hardware-wrapped key support 2025-02-10 09:54:19 -07:00
cqhci-crypto.h mmc: core: Store pointer to bio_crypt_ctx in mmc_request 2021-08-24 10:15:32 +02:00
cqhci.h mmc: cqhci: Remove unused intmask parameter from cqhci_irq() 2026-07-06 15:41:54 +02:00
davinci_mmc.c mmc: davinci: fix mmc_add_host order in probe 2026-05-29 14:15:58 +02:00
dw_mmc-bluefield.c mmc: dw_mmc: Rename dw_mci_pltfm_pmops to dw_mci_pmops 2026-02-24 10:32:47 +01:00
dw_mmc-exynos.c mmc: dw_mmc: exynos: increase DMA threshold value for exynos7870 2026-05-11 16:25:01 +02:00
dw_mmc-exynos.h
dw_mmc-hi3798cv200.c mmc: dw_mmc: Let variant drivers to use struct dw_mci as possible 2026-02-23 12:06:53 +01:00
dw_mmc-hi3798mv200.c mmc: dw_mmc-hi3798mv200: Using phase map from dw_mmc core 2026-03-16 15:43:42 +01:00
dw_mmc-k3.c mmc: dw_mmc: Rename dw_mci_pltfm_pmops to dw_mci_pmops 2026-02-24 10:32:47 +01:00
dw_mmc-pci.c mmc: dw_mmc: Rename dw_mci_pltfm_pmops to dw_mci_pmops 2026-02-24 10:32:47 +01:00
dw_mmc-pltfm.c mmc: dw_mmc-pltfm: Use phase_map for SoCFPGA clock phase configuration 2026-03-23 15:51:23 +01:00
dw_mmc-pltfm.h mmc: dw_mmc: move declaration of dw_mci_pmops 2026-07-15 11:05:57 +02:00
dw_mmc-rockchip.c mmc: dw_mmc-rockchip: Add missing private data for very old controllers 2026-05-29 14:55:24 +02:00
dw_mmc-starfive.c mmc: dw_mmc: Let variant drivers to use struct dw_mci as possible 2026-02-23 12:06:53 +01:00
dw_mmc.c mmc: dw_mmc: stop and complete DMA also in STATE_DATA_BUSY state 2026-07-06 15:48:15 +02:00
dw_mmc.h mmc: dw_mmc: move declaration of dw_mci_pmops 2026-07-15 11:05:57 +02:00
jz4740_mmc.c mmc: jz4740: Fix Wvoid-pointer-to-enum-cast warning 2026-02-23 12:06:53 +01:00
Kconfig mmc: sdhci-pic32: allow driver to be compiled with COMPILE_TEST 2026-02-24 10:32:47 +01:00
litex_mmc.c mmc: litex_mmc: Remove unused logic for the fixed bus width 2026-07-06 16:58:00 +02:00
loongson2-mmc.c mmc: loongson2: Fix sg iteration in data reorder functions 2026-08-04 15:39:11 +02:00
Makefile mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver 2026-02-23 12:06:55 +01:00
meson-gx-mmc.c mmc: host: Fix typos in comments across various files 2024-10-14 12:40:10 +02:00
meson-mx-sdhc-clkc.c mmc: meson-mx-sdhc: use PTR_ERR_OR_ZERO() to simplify code 2025-08-19 14:34:15 +02:00
meson-mx-sdhc-mmc.c mmc: meson-mx-sdhc: Use devm_mmc_alloc_host() helper 2025-06-24 12:43:22 +02:00
meson-mx-sdhc.h mmc: host: meson-mx-sdhc: new driver for the Amlogic Meson SDHC host 2020-05-28 11:22:14 +02:00
meson-mx-sdio.c mmc: host: Remove redundant dev_err()/dev_err_probe() 2026-07-27 16:57:43 +02:00
mmc_hsq.c mmc: hsq: Fix use-after-free in retry work 2026-09-04 10:45:40 +02:00
mmc_hsq.h mmc: hsq: Improve random I/O write performance for 4k buffers 2023-09-27 12:13:18 +02:00
mmc_spi.c mmc: spi: reset bytes_xfered before retrying CRC failures 2026-09-08 17:59:42 +02:00
mmci_qcom_dml.c mmc: mmci: Fix device_node reference leak in of_get_dml_pipe_index() 2026-02-23 12:05:20 +01:00
mmci_stm32_sdmmc.c dma-mapping: don't return errors from dma_set_max_seg_size 2024-08-29 07:22:49 +03:00
mmci.c mmc: mmci: Fix use-after-free in busy-timeout work 2026-09-04 10:40:36 +02:00
mmci.h mmc: host: Fix typos in comments across various files 2024-10-14 12:40:10 +02:00
moxart-mmc.c mmc: moxart: use platform helpers for resource and IRQ 2026-07-27 17:05:29 +02:00
mtk-sd.c mmc: cqhci: Remove unused intmask parameter from cqhci_irq() 2026-07-06 15:41:54 +02:00
mvsdio.c mmc: host: Remove redundant dev_err()/dev_err_probe() 2026-07-27 16:57:43 +02:00
mvsdio.h
mxcmmc.c mmc: mxcmmc: cancel data work and watchdog on remove 2026-09-04 10:43:32 +02:00
mxs-mmc.c mmc: mxs-mmc: use modern PM macros 2025-08-22 12:14:03 +02:00
of_mmc_spi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
omap_hsmmc.c mmc: Merge branch fixes into next 2026-08-04 15:39:35 +02:00
omap.c mmc: omap: add WQ_PERCPU to alloc_workqueue users 2025-11-11 18:15:01 +01:00
owl-mmc.c mmc: host: Remove redundant dev_err()/dev_err_probe() 2026-07-27 16:57:43 +02:00
pxamci.c ARM: PXA: remove remnants of PXA93x support 2026-07-06 15:56:13 +02:00
pxamci.h
renesas_sdhi_core.c mmc: host: renesas_sdhi_core: support selecting an optional mux 2026-03-09 13:44:45 +01:00
renesas_sdhi_internal_dmac.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
renesas_sdhi_sys_dmac.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
renesas_sdhi.h mmc: renesas_sdhi: Add suspend/resume hooks 2025-11-18 16:28:54 +01:00
rtsx_pci_sdmmc.c mmc: rtsx_pci_sdmmc: ignore broken write-protect on ThinkPad X260 2026-09-10 13:33:39 +02:00
rtsx_usb_sdmmc.c mmc: rtsx_usb_sdmmc: suppress false CD after init timeout 2026-07-13 13:15:47 +02:00
sdhci_am654.c mmc: sdhci_am654: Fallback to DT-provided itap delay on DDR50 tuning failure 2026-09-04 11:07:27 +02:00
sdhci_f_sdh30.c mmc: sdhci_f_sdh30: Drop the use of sdhci_pltfm_free() 2025-06-24 12:43:26 +02:00
sdhci_f_sdh30.h mmc: f-sdh30: Add support for non-removable media 2022-12-07 13:22:36 +01:00
sdhci-acpi.c mmc: sdhci-acpi: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-bcm-kona.c mmc: sdhci-bcm-kona: Drop the use of sdhci_pltfm_free() 2025-06-24 12:43:24 +02:00
sdhci-brcmstb.c mmc: cqhci: Remove unused intmask parameter from cqhci_irq() 2026-07-06 15:41:54 +02:00
sdhci-cadence.c mmc: sdhci-cadence: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-cqhci.h mmc: cqhci: Provide helper for resetting both SDHCI and CQHCI 2022-11-07 13:28:47 +01:00
sdhci-dove.c mmc: sdhci-dove: Drop the use of sdhci_pltfm_free() 2025-06-24 12:43:24 +02:00
sdhci-esdhc-imx.c mmc: Merge branch fixes into next 2026-07-15 11:06:40 +02:00
sdhci-esdhc-mcf.c mmc: sdhci-esdhc-mcf: do not use readl()/writel() on ColdFire 2026-07-06 16:00:02 +02:00
sdhci-esdhc.h mmc: sdhci-of-esdhc: make sure delay chain locked for HS400 2020-10-28 11:07:01 +01:00
sdhci-iproc.c mmc: sdhci-iproc: Drop the use of sdhci_pltfm_free() 2025-06-24 12:43:24 +02:00
sdhci-milbeaut.c mmc: sdhci-milbeaut: Drop the use of sdhci_free_host() 2025-06-24 12:43:24 +02:00
sdhci-msm.c mmc: host: Remove redundant dev_err()/dev_err_probe() 2026-07-27 16:57:43 +02:00
sdhci-npcm.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
sdhci-of-arasan.c mmc: cqhci: Remove unused intmask parameter from cqhci_irq() 2026-07-06 15:41:54 +02:00
sdhci-of-aspeed-test.c mmc: sdhci-of-aspeed: test: Use kunit_test_suite() macro 2022-07-11 17:13:32 -06:00
sdhci-of-aspeed.c mmc: sdhci-of-aspeed: Remove children before releasing SDC resources 2026-09-14 12:04:29 +02:00
sdhci-of-at91.c mmc: sdhci-of-at91: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-of-bst.c mmc: sdhci-of-bst: Fix memory leak in sdhci_bst_alloc_bounce_buffer() 2026-03-09 14:03:24 +01:00
sdhci-of-dwcmshc.c mmc: sdhci-of-dwcmshc: Log eMMC reset calls 2026-07-10 14:42:09 +02:00
sdhci-of-esdhc.c mmc: sdhci-of-esdhc: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-of-hlwd.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-of-k1.c mmc: sdhci-of-k1: add comprehensive SDR tuning support 2026-05-11 17:35:47 +02:00
sdhci-of-ma35d1.c mmc: sdhci-of-ma35d1: add missing MODULE_DEVICE_TABLE() 2026-07-06 17:20:24 +02:00
sdhci-of-sparx5.c mmc: sdhci-of-sparx5: Drop the use of sdhci_pltfm_free() 2025-06-24 12:43:25 +02:00
sdhci-omap.c mmc: sdhci-omap: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-pci-arasan.c
sdhci-pci-core.c mmc: cqhci: Remove unused intmask parameter from cqhci_irq() 2026-07-06 15:41:54 +02:00
sdhci-pci-dwc-mshc.c
sdhci-pci-gli.c mmc: cqhci: Remove unused intmask parameter from cqhci_irq() 2026-07-06 15:41:54 +02:00
sdhci-pci-o2micro.c mmc: sdhci-pci-o2micro: Convert PCIBIOS_* return codes to errnos 2024-06-20 10:57:44 +02:00
sdhci-pci.h mmc: sdhci-pci: Add DMI quirk for missing CD GPIO on Vexia Edu Atla 10 tablet 2024-12-02 15:06:03 +01:00
sdhci-pic32.c mmc: sdhci-pic32: add SPDX license identifier 2026-02-24 10:32:47 +01:00
sdhci-pltfm.c mmc: sdhci-pltfm: remove duplicate DTS property parsing 2026-03-16 16:14:29 +01:00
sdhci-pltfm.h mmc: sdhci: Drop sdhci_free_host()/sdhci_pltfm_free() interface 2025-06-24 12:43:26 +02:00
sdhci-pxav2.c mmc: sdhci-pxav2: Drop the use of sdhci_pltfm_free() 2025-06-24 12:43:25 +02:00
sdhci-pxav3.c mmc: sdhci-pxav3: use modern PM macros 2025-08-22 12:14:03 +02:00
sdhci-s3c.c mmc: sdhci-s3c: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-spear.c mmc: sdhci-spear: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-sprd.c mmc: sdhci-sprd: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-st.c mmc: sdhci-st: use modern PM macros 2025-08-22 12:14:04 +02:00
sdhci-tegra.c mmc: sdhci-tegra: Add Tegra264 SoC data 2026-08-03 14:33:36 +02:00
sdhci-uhs2.c mmc: host: Remove unnecessary module_init/exit functions 2026-02-24 10:32:14 +01:00
sdhci-uhs2.h mmc: sdhci-uhs2: add irq() and others 2024-10-24 14:37:42 +02:00
sdhci-xenon-phy.c mmc: sdhci-xenon: add timeout for PHY init complete 2024-02-28 13:41:35 +01:00
sdhci-xenon.c mmc: sdhci-xenon: use modern PM macros 2025-08-22 12:14:03 +02:00
sdhci-xenon.h mmc: xenon: Add ac5 support via bounce buffer 2024-01-05 11:03:56 +01:00
sdhci.c mmc: sdhci: unmap the bounce buffer before device release 2026-08-04 13:24:20 +02:00
sdhci.h mmc: sdhci: make tuning_err a signed int 2026-08-04 13:23:00 +02:00
sdricoh_cs.c mmc: sdricoh_cs: Use devm_mmc_alloc_host() helper 2025-06-24 12:43:23 +02:00
sh_mmcif.c mmc: sh_mmcif: initialize IRQ-thread mutex before requesting interrupt 2026-09-11 17:12:01 +02:00
sunplus-mmc.c mmc: rename mmc_can_gpio_cd() to mmc_host_can_gpio_cd() 2025-05-14 16:59:17 +02:00
sunxi-mmc.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
tifm_sd.c memstick: Constify the driver id_table 2026-05-11 16:59:43 +02:00
tmio_mmc_core.c mmc: tmio: Add 64-bit read/write support for SD_BUF0 in polling mode 2025-08-19 14:34:14 +02:00
tmio_mmc.h mmc: renesas_sdhi: Switch to SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() and pm_ptr() 2025-11-18 16:28:54 +01:00
toshsd.c mmc: toshsd: use modern PM macros 2025-08-22 12:14:04 +02:00
toshsd.h
uniphier-sd.c mmc: tmio: Use devm_mmc_alloc_host() helper 2025-06-24 12:43:24 +02:00
usdhi6rol0.c mmc: drop nth_page() usage within SG entry 2025-09-21 14:22:08 -07:00
ushc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
via-sdmmc.c mmc: via-sdmmc: cancel card-detect work on remove 2026-07-27 17:59:33 +02:00
vub300.c mmc: vub300: defer reset until cmd_mutex is unlocked 2026-07-06 16:20:12 +02:00
wbsd.c mmc: wbsd: Drop unused assignment of pnp_device_id driver data 2026-07-06 16:03:17 +02:00
wbsd.h mmc: Convert from tasklet to BH workqueue 2024-07-08 11:41:30 +02:00
wmt-sdmmc.c mmc: host: Move MODULE_DEVICE_TABLE next to the table itself 2026-05-11 16:59:24 +02:00