From 4151bedcbe94e1f2f63d9fcdfc541e5ede327713 Mon Sep 17 00:00:00 2001 From: Rahul Sharma Date: Fri, 14 Jul 2017 14:06:37 +0530 Subject: [PATCH] msm: ais: sensor: actuator: add conditional check for ioctl Add conditional check when sending VIDIOC_MSM_ACTUATOR_CFG32. Change-Id: I8f47823a9f932fe9f3fa96560f16d7da755a781f CRs-Fixed: 2060371 Signed-off-by: Rahul Sharma --- drivers/media/platform/msm/ais/sensor/actuator/msm_actuator.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/platform/msm/ais/sensor/actuator/msm_actuator.c b/drivers/media/platform/msm/ais/sensor/actuator/msm_actuator.c index 1adb380f335f..40806d5a164f 100644 --- a/drivers/media/platform/msm/ais/sensor/actuator/msm_actuator.c +++ b/drivers/media/platform/msm/ais/sensor/actuator/msm_actuator.c @@ -1722,6 +1722,10 @@ static long msm_actuator_subdev_do_ioctl( parg = &actuator_data; break; } + break; + case VIDIOC_MSM_ACTUATOR_CFG: + pr_err("%s: invalid cmd 0x%x received\n", __func__, cmd); + return -EINVAL; } rc = msm_actuator_subdev_ioctl(sd, cmd, parg);