fix a bug error handling in MMC driver