diff --git a/drivers/sensors/sensor.c b/drivers/sensors/sensor.c index 41717cb9bb..e054116a8d 100644 --- a/drivers/sensors/sensor.c +++ b/drivers/sensors/sensor.c @@ -647,7 +647,8 @@ static int sensor_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SNIOC_SET_INTERVAL: { nxrmutex_lock(&upper->lock); - ret = sensor_update_interval(filep, upper, user, arg); + ret = sensor_update_interval(filep, upper, user, + arg ? arg : ULONG_MAX); nxrmutex_unlock(&upper->lock); } break;