diff --git a/drivers/can/can_handlers.c b/drivers/can/can_handlers.c index de44d70c817..91ceead896a 100644 --- a/drivers/can/can_handlers.c +++ b/drivers/can/can_handlers.c @@ -10,14 +10,14 @@ static int z_vrfy_can_calc_timing(const struct device *dev, struct can_timing *res, uint32_t bitrate, uint16_t sample_pnt) { - struct can_timing local_res; + struct can_timing res_copy; int err; Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, get_core_clock)); - Z_OOPS(z_user_from_copy(&local_res, res, sizeof(local_res))); + Z_OOPS(z_user_from_copy(&res_copy, res, sizeof(res_copy))); - err = z_impl_can_calc_timing(dev, &local_res, bitrate, sample_pnt); - Z_OOPS(z_user_to_copy(res, &local_res, sizeof(*res))); + err = z_impl_can_calc_timing(dev, &res_copy, bitrate, sample_pnt); + Z_OOPS(z_user_to_copy(res, &res_copy, sizeof(*res))); return err; } @@ -84,14 +84,14 @@ static inline const struct can_timing *z_vrfy_can_get_timing_max(const struct de static int z_vrfy_can_calc_timing_data(const struct device *dev, struct can_timing *res, uint32_t bitrate, uint16_t sample_pnt) { - struct can_timing local_res; + struct can_timing res_copy; int err; Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, get_core_clock)); - Z_OOPS(z_user_from_copy(&local_res, res, sizeof(local_res))); + Z_OOPS(z_user_from_copy(&res_copy, res, sizeof(res_copy))); - err = z_impl_can_calc_timing_data(dev, &local_res, bitrate, sample_pnt); - Z_OOPS(z_user_to_copy(res, &local_res, sizeof(*res))); + err = z_impl_can_calc_timing_data(dev, &res_copy, bitrate, sample_pnt); + Z_OOPS(z_user_to_copy(res, &res_copy, sizeof(*res))); return err; }