]> git.baikalelectronics.ru Git - uboot.git/commit
arm: stm32mp: stm32prog: check result of find_mmc_device
authorPatrick Delaunay <patrick.delaunay@st.com>
Mon, 6 Jul 2020 11:20:58 +0000 (13:20 +0200)
committerPatrice Chotard <patrice.chotard@st.com>
Tue, 28 Jul 2020 15:43:46 +0000 (17:43 +0200)
commit082ba88bf3264a373ad0a6234ca5009273ef1d1b
treea29481523880abc2e560c979ac51a77c8a1a224d
parentd8a2bd5441c4bfe5cb0b8a63b8675fc76a501472
arm: stm32mp: stm32prog: check result of find_mmc_device

Check result of find_mmc_device() before calling mmc_init().

This patch avoid a data abort when the command try to acces
to sd/mmc device deactivated in device tree.

Fixes: 591d032df6e2 ("stm32mp: stm32prog: add MMC device")
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c