From a5c619c20707c2523572ddbff08bb2860d4013cc Mon Sep 17 00:00:00 2001 From: Ouss4 Date: Sun, 5 Apr 2020 20:27:03 +0100 Subject: [PATCH] arch/arm/src/cxd56xx/cxd56_emmc.c: Don't wait for the semaphore if the task was canceled. --- arch/arm/src/cxd56xx/cxd56_emmc.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/arch/arm/src/cxd56xx/cxd56_emmc.c b/arch/arm/src/cxd56xx/cxd56_emmc.c index 3ff6729af8..7bd93f9fce 100644 --- a/arch/arm/src/cxd56xx/cxd56_emmc.c +++ b/arch/arm/src/cxd56xx/cxd56_emmc.c @@ -441,21 +441,11 @@ static void emmc_send(int datatype, uint32_t opcode, uint32_t arg, /* Wait for command or data transfer done */ - do + ret = emmc_takesem(&g_waitsem); + if (ret < 0) { - ret = emmc_takesem(&g_waitsem); - - /* The only expected error is ECANCELED which would occur if the - * calling thread were canceled. - */ - - DEBUGASSERT(ret == OK || ret == -ECANCELED); - - /* REVISIT: emmc_taksem error is lost. This loop needs to save - * the return from takesem and return it at the end. - */ + return; } - while (ret < 0); /* Restore interrupt mask */