mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 13:13:08 +08:00
driver/sensor: add _SNIOCVALID check to command
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user