From 6b6d983650b1ddad4ccb7f21fda6a0c3e843cd19 Mon Sep 17 00:00:00 2001 From: Abdelatif Guettouche Date: Thu, 10 Sep 2020 16:27:41 +0100 Subject: [PATCH] arch/xtensa/src/esp32/esp32_spiflash.c: Don't double check for direct read mode. Signed-off-by: Abdelatif Guettouche --- arch/xtensa/src/esp32/esp32_spiflash.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/arch/xtensa/src/esp32/esp32_spiflash.c b/arch/xtensa/src/esp32/esp32_spiflash.c index c9402f8272..d34ba557c6 100644 --- a/arch/xtensa/src/esp32/esp32_spiflash.c +++ b/arch/xtensa/src/esp32/esp32_spiflash.c @@ -425,16 +425,7 @@ static int esp32_read_status(FAR struct esp32_spiflash_s *priv, esp32_spiflash_chip_t *chip = priv->chip; uint32_t regval; uint32_t flags; - bool direct = priv->dummies[1] == 0; - - if (priv->dummies[1] == 0) - { - direct = true; - } - else - { - direct = false; - } + bool direct = (priv->dummies[1] == 0); do {