mmc: core: Fix used uninitialized warning when CONFIG_ROCKCHIP_THUNDER_BOOT=y

Fixes:
drivers/mmc/core/mmc.c: In function 'mmc_init_card':
drivers/mmc/core/mmc.c:760:3: warning: 'ecsd' may be used uninitialized in this function [-Wmaybe-uninitialized]

Fixes: bc28e06c42 ("mmc: add thunder boot support")
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I2a82c260f7f03f11bbfdc8a4f341f528ce50d44f
This commit is contained in:
Ziyuan Xu
2022-01-20 11:31:00 +08:00
committed by Tao Huang
parent 40b753b965
commit b5f03114e3

View File

@@ -697,7 +697,7 @@ static int mmc_read_ext_csd(struct mmc_card *card)
u8 *ext_csd;
int err;
#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT
void *ecsd;
void *ecsd = NULL;
bool valid_ecsd = false;
struct device_node *mem;
struct resource reg;