1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Check for bus number 0 in spiSetBusInstance()

This commit is contained in:
Steve Evans 2021-11-30 18:05:24 +00:00
parent 7a3cbd0706
commit 71f8eb866f

View file

@ -486,7 +486,7 @@ static void spiRxIrqHandler(dmaChannelDescriptor_t* descriptor)
// Mark this bus as being SPI
bool spiSetBusInstance(extDevice_t *dev, uint32_t device)
{
if (device > SPIDEV_COUNT) {
if ((device == 0) || (device > SPIDEV_COUNT)) {
return false;
}