From 8adbd4daaefb0f42591f70be41163dbe29209281 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 9 May 2015 11:03:02 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7957 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/sdc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/os/hal/src/sdc.c b/os/hal/src/sdc.c index e3cf125dd..40006a6c1 100644 --- a/os/hal/src/sdc.c +++ b/os/hal/src/sdc.c @@ -965,18 +965,21 @@ bool sdcErase(SDCDriver *sdcp, uint32_t startblk, uint32_t endblk) { if ((sdc_lld_send_cmd_short_crc(sdcp, MMCSD_CMD_ERASE_RW_BLK_START, startblk, resp) != HAL_SUCCESS) || - MMCSD_R1_ERROR(resp[0])) + MMCSD_R1_ERROR(resp[0])) { goto failed; + } if ((sdc_lld_send_cmd_short_crc(sdcp, MMCSD_CMD_ERASE_RW_BLK_END, endblk, resp) != HAL_SUCCESS) || - MMCSD_R1_ERROR(resp[0])) + MMCSD_R1_ERROR(resp[0])) { goto failed; + } if ((sdc_lld_send_cmd_short_crc(sdcp, MMCSD_CMD_ERASE, 0, resp) != HAL_SUCCESS) || - MMCSD_R1_ERROR(resp[0])) + MMCSD_R1_ERROR(resp[0])) { goto failed; + } /* Quick sleep to allow it to transition to programming or receiving state */ /* TODO: ??????????????????????????? */ -- cgit v1.2.3