From 414afa62b9730059541e43ade64d4923650db9cd Mon Sep 17 00:00:00 2001 From: Jeffy Chen Date: Thu, 21 Jul 2016 10:38:51 +0800 Subject: [PATCH] CHROMIUM: v4l2-ctrls: fix s_ext_ctrls error when passing non-zero ctrl_class due to a merge mistake in I3b80a31681765836a134812ebc56686324ca5194. Change-Id: Iad2914518997b664704f2c2933c8327fc4252bbb Signed-off-by: Jeffy Chen --- drivers/media/v4l2-core/v4l2-ctrls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index cc8164c0e7c7..f82434e178e1 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -2801,6 +2801,7 @@ static int prepare_ext_ctrls(struct v4l2_ctrl_handler *hdl, struct v4l2_ctrl_helper *helpers, bool get) { + u32 which = V4L2_CTRL_ID2WHICH(cs->which); unsigned store = cs->config_store & 0xffff; struct v4l2_ctrl_helper *h; bool have_clusters = false; @@ -2814,7 +2815,7 @@ static int prepare_ext_ctrls(struct v4l2_ctrl_handler *hdl, cs->error_idx = i; - if (cs->which && V4L2_CTRL_ID2WHICH(id) != cs->which) + if (which && V4L2_CTRL_ID2WHICH(id) != cs->which) return -EINVAL; /* Old-style private controls are not allowed for -- 2.34.1