summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorFan YANG <[email protected]>2024-08-12 11:17:35 +0800
committerRbb666 <[email protected]>2024-08-12 16:23:17 +0800
commit55c33d9ce2934adf13f577ce084fe0b196c285ba (patch)
treeeea2fadefa06f3f14a0d0417a057e4f69246f502 /components
parent1d646bcf56f6947643e8ed507875c648cdf3d195 (diff)
[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 <[email protected]>
Diffstat (limited to 'components')
-rw-r--r--components/drivers/sdio/sd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/drivers/sdio/sd.c b/components/drivers/sdio/sd.c
index 6e826d5af5..a6f4dda93a 100644
--- a/components/drivers/sdio/sd.c
+++ b/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;