diff options
author | Sam Edwards <cfsworks@gmail.com> | 2023-05-18 13:47:07 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-05-31 17:23:01 -0400 |
commit | 229d689e3c32164875667da282e496b858dbc608 (patch) | |
tree | eecf08dd3376548353ec92e67c4ad56215c95fe4 | |
parent | de06083c8808c57d55fffabb727a0d7c8c15612c (diff) | |
download | u-boot-WIP/2023-05-31-assorted-fixes-and-improvements.zip u-boot-WIP/2023-05-31-assorted-fixes-and-improvements.tar.gz u-boot-WIP/2023-05-31-assorted-fixes-and-improvements.tar.bz2 |
mmc: fix improper use of memsetWIP/2023-05-31-assorted-fixes-and-improvements
Buffers created through DEFINE_(CACHE_)ALIGN_BUFFER are actually
pointers to the real underlying buffer. Using sizeof(...) is
not appropriate in this case.
Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
-rw-r--r-- | drivers/mmc/mmc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 1af6af8..72c1076 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -2262,7 +2262,7 @@ static int mmc_startup_v4(struct mmc *mmc) return 0; if (!mmc->ext_csd) - memset(ext_csd_bkup, 0, sizeof(ext_csd_bkup)); + memset(ext_csd_bkup, 0, MMC_MAX_BLOCK_LEN); err = mmc_send_ext_csd(mmc, ext_csd); if (err) |