drivers: can: handlers: verify API call in z_vrfy_can_add_rx_filter_msgq()
Verify the add_rx_filter API call in z_vrfy_can_add_rx_filter_msgq() as this is used by the underlying implementation. Remove unnecessary typecasts. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
c1477f9b38
commit
422a2a8204
1 changed files with 3 additions and 7 deletions
|
@ -127,15 +127,11 @@ static inline int z_vrfy_can_add_rx_filter_msgq(const struct device *dev,
|
|||
struct k_msgq *msgq,
|
||||
const struct zcan_filter *filter)
|
||||
{
|
||||
Z_OOPS(Z_SYSCALL_OBJ(dev, K_OBJ_DRIVER_CAN));
|
||||
|
||||
Z_OOPS(Z_SYSCALL_MEMORY_READ((struct zcan_filter *)filter,
|
||||
sizeof(struct zcan_filter)));
|
||||
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, add_rx_filter));
|
||||
Z_OOPS(Z_SYSCALL_OBJ(msgq, K_OBJ_MSGQ));
|
||||
Z_OOPS(Z_SYSCALL_MEMORY_READ(filter, sizeof(*filter)));
|
||||
|
||||
return z_impl_can_add_rx_filter_msgq((const struct device *)dev,
|
||||
(struct k_msgq *)msgq,
|
||||
(const struct zcan_filter *)filter);
|
||||
return z_impl_can_add_rx_filter_msgq(dev, msgq, filter);
|
||||
}
|
||||
#include <syscalls/can_add_rx_filter_msgq_mrsh.c>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue