summaryrefslogtreecommitdiffstats
path: root/commands/mmc_extcsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/mmc_extcsd.c')
-rw-r--r--commands/mmc_extcsd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/commands/mmc_extcsd.c b/commands/mmc_extcsd.c
index 7ae068348d..993a6dd12b 100644
--- a/commands/mmc_extcsd.c
+++ b/commands/mmc_extcsd.c
@@ -1427,7 +1427,7 @@ static int print_field(u8 *reg, int index)
case EXT_CSD_MAX_ENH_SIZE_MULT:
tmp = get_field_val(EXT_CSD_HC_WP_GRP_SIZE, 0, 0xFF);
- tmp = tmp + get_field_val(EXT_CSD_HC_ERASE_GRP_SIZE, 0, 0xFF);
+ tmp = tmp * get_field_val(EXT_CSD_HC_ERASE_GRP_SIZE, 0, 0xFF);
tmp64 *= tmp;
tmp64 *= SZ_512K;
printf("\tMax Enhanced Area: %llu B\n", tmp64);
@@ -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;
}