Browse Source

[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>
Fan YANG 11 months ago
parent
commit
55c33d9ce2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      components/drivers/sdio/sd.c

+ 1 - 1
components/drivers/sdio/sd.c

@@ -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;