diff options
| author | ZYH <[email protected]> | 2018-09-22 15:05:05 +0800 |
|---|---|---|
| committer | ZYH <[email protected]> | 2018-09-30 11:01:06 +0800 |
| commit | 2e74539130d41add6c729d231603ee2cb2e6729d (patch) | |
| tree | 9f56b6ca65f58bce61df87a9ffcc587780bcaa73 /components/drivers | |
| parent | 780f538525637eaed5315c66ee1c52228c16b1d6 (diff) | |
[Components][SDIO]fix 'rocr' declared without an initial value
Diffstat (limited to 'components/drivers')
| -rw-r--r-- | components/drivers/sdio/mmc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/drivers/sdio/mmc.c b/components/drivers/sdio/mmc.c index b928119b7d..efda67c087 100644 --- a/components/drivers/sdio/mmc.c +++ b/components/drivers/sdio/mmc.c @@ -198,12 +198,12 @@ static int mmc_get_ext_csd(struct rt_mmcsd_card *card, rt_uint8_t **new_ext_csd) */ static int mmc_parse_ext_csd(struct rt_mmcsd_card *card, rt_uint8_t *ext_csd) { - if(RT_NULL == card || RT_NULL == ext_csd) + if(card == RT_NULL || ext_csd == RT_NULL) { LOG_E("emmc parse ext csd fail, invaild args"); return -1; } - + card->flags |= CARD_FLAG_HIGHSPEED; card->hs_max_data_rate = 200000000; @@ -430,7 +430,7 @@ 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; + 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; |
