]> git.dujemihanovic.xyz Git - u-boot.git/commit
mmc: exynos_dw_mmc: Fix getting private data in exynos_dwmci_board_init()
authorSam Protsenko <semen.protsenko@linaro.org>
Thu, 8 Aug 2024 03:14:24 +0000 (22:14 -0500)
committerMinkyu Kang <mk7.kang@samsung.com>
Mon, 19 Aug 2024 07:09:06 +0000 (16:09 +0900)
commitc61f92eeb66ede2738bf3d766c645eda3fcf05c8
tree1add65ec1ea2dc956fda97ef2d58faa3e34cf085
parentff2b88365d91120d63434e1b616da739066b11df
mmc: exynos_dw_mmc: Fix getting private data in exynos_dwmci_board_init()

In case of CONFIG_DM_MMC, host->priv actually holds (struct udevice *),
and not (struct dwmci_exynos_priv_data *). This makes *priv pointer
invalid and may lead to Synchronous Abort during its dereference later
in exynos_dwmci_board_init(). Fix it by extracting
exynos_dwmmc_get_priv() helper from exynos_dwmci_clksel() and using it
for getting the private data in exynos_dwmci_board_init()

Fixes: 3537ee879e04 ("mmc: exynos_dw_mmc: support the Driver mode for Exynos")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
drivers/mmc/exynos_dw_mmc.c