driver/sensor: convert interval 0 to ULONG_MAX

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong 2022-06-15 21:26:09 +08:00 committed by Xiang Xiao
parent 78eb832e23
commit 8e03f213e3

View File

@ -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;