mci_send_ext_csd may do DMA directly to the passed in buffer. Therefore, be sure to allocate the buffer with suitable alignment. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- commands/mmc_extcsd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/mmc_extcsd.c b/commands/mmc_extcsd.c index f67c48404a54..993a6dd12b23 100644 --- a/commands/mmc_extcsd.c +++ b/commands/mmc_extcsd.c @@ -2418,7 +2418,7 @@ static int do_mmc_extcsd(int argc, char *argv[]) retval = -ENOENT; goto error; } - dst = xmalloc(EXT_CSD_BLOCKSIZE); + dst = dma_alloc(EXT_CSD_BLOCKSIZE); retval = mci_send_ext_csd(mci, dst); if (retval != 0) @@ -2473,7 +2473,7 @@ static int do_mmc_extcsd(int argc, char *argv[]) print_register_readable(dst, index); error_with_mem: - free(dst); + dma_free(dst); error: return retval; } -- 2.39.2