[Components][SDIO][MMC] fix null point check

This commit is contained in:
ZYH 2018-09-22 15:02:48 +08:00
parent 3d69c44ab8
commit 780f538525
1 changed files with 6 additions and 0 deletions

View File

@ -198,6 +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)
{
LOG_E("emmc parse ext csd fail, invaild args");
return -1;
}
card->flags |= CARD_FLAG_HIGHSPEED;
card->hs_max_data_rate = 200000000;