[components] fix compiling warning (#6733)

This commit is contained in:
Bernard Xiong 2022-12-13 09:44:45 +08:00 committed by GitHub
parent aa0c8b4a93
commit 2aa600e01b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 7 deletions

View File

@ -514,7 +514,6 @@ static rt_int32_t mmcsd_mmc_init_card(struct rt_mmcsd_host *host,
rt_int32_t err;
rt_uint32_t resp[4];
rt_uint32_t rocr = 0;
rt_uint32_t max_data_rate;
rt_uint8_t *ext_csd = RT_NULL;
struct rt_mmcsd_card *card = RT_NULL;
@ -599,12 +598,6 @@ static rt_int32_t mmcsd_mmc_init_card(struct rt_mmcsd_host *host,
if (!(card->flags & CARD_FLAG_SDHC) && (rocr & (1 << 30)))
card->flags |= CARD_FLAG_SDHC;
/* set bus speed */
if (card->flags & (CARD_FLAG_HIGHSPEED | CARD_FLAG_HIGHSPEED_DDR))
max_data_rate = card->hs_max_data_rate;
else
max_data_rate = card->max_data_rate;
/*switch bus width and bus mode*/
err = mmc_select_bus_width(card, ext_csd);
if (err)