diff --git a/platforms/common/spi.cpp b/platforms/common/spi.cpp index 62713b0798..adda7b4b57 100644 --- a/platforms/common/spi.cpp +++ b/platforms/common/spi.cpp @@ -71,7 +71,7 @@ const px4_spi_bus_t *px4_spi_buses{nullptr}; int px4_find_spi_bus(uint32_t devid) { - for (int i = 0; (px4_spi_bus_t *) px4_spi_buses != nullptr && i < SPI_BUS_MAX_BUS_ITEMS; ++i) { + for (int i = 0; ((px4_spi_bus_t *) px4_spi_buses) != nullptr && i < SPI_BUS_MAX_BUS_ITEMS; ++i) { const px4_spi_bus_t &bus_data = px4_spi_buses[i]; if (bus_data.bus == -1) {