driver/sensor: add _SNIOCVALID check to command
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
8de6c29aa4
commit
2f5727b102
@ -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…
x
Reference in New Issue
Block a user