mirror of
https://github.com/apache/nuttx.git
synced 2026-09-01 14:43:02 +00:00
driver/sensor: add _SNIOCVALID check to command
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
8de6c29aa4
commit
2f5727b102
1 changed files with 1 additions and 1 deletions
|
|
@ -646,7 +646,7 @@ static int sensor_rpmsg_control(FAR struct file *filep,
|
|||
{
|
||||
return drv->ops->control(filep, drv, cmd, arg);
|
||||
}
|
||||
else if (!(filep->f_oflags & O_REMOTE))
|
||||
else if (!(filep->f_oflags & O_REMOTE) && _SNIOCVALID(cmd))
|
||||
{
|
||||
return sensor_rpmsg_ioctl(dev, cmd, arg,
|
||||
sizeof(*ioctl) + ioctl->len, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue