uorb: fix, should check min_interval modified by lowerhalf.
Signed-off-by: jihandong <jihandong@xiaomi.com>
This commit is contained in:
parent
fe1d83c41b
commit
12e5371a05
@ -250,11 +250,16 @@ static int sensor_update_interval(FAR struct file *filep,
|
||||
if (min_interval != ULONG_MAX &&
|
||||
min_interval != upper->state.min_interval)
|
||||
{
|
||||
unsigned long expected_interval = min_interval;
|
||||
ret = lower->ops->set_interval(lower, filep, &min_interval);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
else if (min_interval > expected_interval)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
if (min_latency == ULONG_MAX)
|
||||
|
Loading…
Reference in New Issue
Block a user