[components][drivers][sdio][sd] Fix wrong max data rate calculation logic

- corrected the default value for max_data_rate variable

Signed-off-by: Fan YANG <fan.yang@hpmicro.com>
This commit is contained in:
Fan YANG 2024-08-12 11:17:35 +08:00 committed by Rbb666
parent 1d646bcf56
commit 55c33d9ce2
1 changed files with 1 additions and 1 deletions

View File

@ -788,7 +788,7 @@ static rt_int32_t mmcsd_sd_init_card(struct rt_mmcsd_host *host,
goto err1;
/* set bus speed */
max_data_rate = (unsigned int)-1;
max_data_rate = 0U;
if (max_data_rate < card->hs_max_data_rate)
{
max_data_rate = card->hs_max_data_rate;