Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4f8988d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: Add error check for cmd in IOCTL."

parents 631c0892 020d79c4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -485,6 +485,9 @@ static long camera_v4l2_vidioc_private_ioctl(struct file *filep, void *fh,
	if (WARN_ON(!k_ioctl || !pvdev))
		return -EIO;

	if (cmd != VIDIOC_MSM_CAMERA_PRIVATE_IOCTL_CMD)
		return -EINVAL;

	switch (k_ioctl->id) {
	case MSM_CAMERA_PRIV_IOCTL_ID_RETURN_BUF: {
		struct msm_camera_return_buf ptr, *tmp = NULL;