drivers: can: handlers: can_get_max_bitrate() is an optional
The can_get_max_bitrate() is an optional API function. Limit validation to the CAN device driver pointer. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
b9f635426d
commit
49424574c5
1 changed files with 2 additions and 1 deletions
|
@ -48,7 +48,8 @@ static inline int z_vrfy_can_get_core_clock(const struct device *dev,
|
|||
static inline int z_vrfy_can_get_max_bitrate(const struct device *dev,
|
||||
uint32_t *max_bitrate)
|
||||
{
|
||||
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, get_max_bitrate));
|
||||
/* Optional API function */
|
||||
Z_OOPS(Z_SYSCALL_OBJ(dev, K_OBJ_DRIVER_CAN));
|
||||
Z_OOPS(Z_SYSCALL_MEMORY_WRITE(max_bitrate, sizeof(*max_bitrate)));
|
||||
|
||||
return z_impl_can_get_max_bitrate(dev, max_bitrate);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue