Check validity of command before processing.
Change-Id: Icc5c57eac999b7c40fbb9505b2b88745167adc66
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
if (!event_data)
return -EINVAL;
+ switch (cmd) {
+ case MSM_CAM_V4L2_IOCTL_NOTIFY:
+ case MSM_CAM_V4L2_IOCTL_CMD_ACK:
+ case MSM_CAM_V4L2_IOCTL_NOTIFY_DEBUG:
+ case MSM_CAM_V4L2_IOCTL_NOTIFY_ERROR:
+ break;
+ default:
+ return -ENOTTY;
+ }
+
memset(&event, 0, sizeof(struct v4l2_event));
session_id = event_data->session_id;
stream_id = event_data->stream_id;