Fix error: mmcsd/mmcsd_sdio.c:2669:35: error: 'buffer' may be used uninitialized [-Werror=maybe-uninitialized]

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-10-23 19:48:12 +08:00 committed by Petro Karashchenko
parent ee82f7b5ca
commit 57b6447e0a
1 changed files with 2 additions and 0 deletions

View File

@ -2659,6 +2659,8 @@ static int mmcsd_read_csd(FAR struct mmcsd_state_s *priv)
return -EPERM;
}
memset(buffer, 0, sizeof(buffer));
#if defined(CONFIG_SDIO_DMA) && defined(CONFIG_ARCH_HAVE_SDIO_PREFLIGHT)
/* If we think we are going to perform a DMA transfer, make sure that we
* will be able to before we commit the card to the operation.