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 {