Return a more explicit error value
authorNathael Pajani <nathael.pajani@ed3l.fr>
Mon, 26 Sep 2016 16:11:51 +0000 (18:11 +0200)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Fri, 10 Feb 2023 18:02:59 +0000 (19:02 +0100)
drivers/gpio.c

index 0b3a8b2..1a10b4c 100644 (file)
@@ -97,7 +97,7 @@ int set_gpio_callback(void (*callback) (uint32_t), const struct pio* gpio, uint8
        }
        /* If not found, return. */
        if (irq == NB_PININT_INTERRUPTS) {
-               return -1;
+               return -ENODEV;
        }
 
        /* Power on the Pin interrupt subsystem */