Skip to content

Commit d6d42be

Browse files
Andrew Boiejhedberg
authored andcommitted
drivers: gpio: fix syscall handlers
No driver object checks were being performed for 3 APIs. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
1 parent f669b7c commit d6d42be

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpio/gpio_handlers.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,25 @@ static inline int z_vrfy_gpio_pin_interrupt_configure(struct device *port,
7171
static inline int z_vrfy_gpio_enable_callback(struct device *port,
7272
gpio_pin_t pin)
7373
{
74+
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(port, enable_callback));
75+
7476
return z_impl_gpio_enable_callback((struct device *)port, pin);
7577
}
7678
#include <syscalls/gpio_enable_callback_mrsh.c>
7779

7880
static inline int z_vrfy_gpio_disable_callback(struct device *port,
7981
gpio_pin_t pin)
8082
{
83+
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(port, disable_callback));
84+
8185
return z_impl_gpio_disable_callback((struct device *)port, pin);
8286
}
8387
#include <syscalls/gpio_disable_callback_mrsh.c>
8488

8589
static inline int z_vrfy_gpio_get_pending_int(struct device *dev)
8690
{
91+
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(dev, get_pending_int));
92+
8793
return z_impl_gpio_get_pending_int((struct device *)dev);
8894
}
8995
#include <syscalls/gpio_get_pending_int_mrsh.c>

0 commit comments

Comments
 (0)