diff options
| author | Sam Edwards <[email protected]> | 2023-05-18 13:47:07 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-05-31 17:23:01 -0400 |
| commit | 229d689e3c32164875667da282e496b858dbc608 (patch) | |
| tree | eecf08dd3376548353ec92e67c4ad56215c95fe4 /drivers | |
| parent | de06083c8808c57d55fffabb727a0d7c8c15612c (diff) | |
mmc: fix improper use of memset
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 <[email protected]>
Reviewed-by: Peng Fan <[email protected]>
Diffstat (limited to 'drivers')
| -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 1af6af82e6b..72c1076c56d 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) |
