[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:
parent
1d646bcf56
commit
55c33d9ce2
|
@ -788,7 +788,7 @@ static rt_int32_t mmcsd_sd_init_card(struct rt_mmcsd_host *host,
|
||||||
goto err1;
|
goto err1;
|
||||||
|
|
||||||
/* set bus speed */
|
/* set bus speed */
|
||||||
max_data_rate = (unsigned int)-1;
|
max_data_rate = 0U;
|
||||||
if (max_data_rate < card->hs_max_data_rate)
|
if (max_data_rate < card->hs_max_data_rate)
|
||||||
{
|
{
|
||||||
max_data_rate = card->hs_max_data_rate;
|
max_data_rate = card->hs_max_data_rate;
|
||||||
|
|
Loading…
Reference in New Issue