From patchwork Fri Dec 3 13:15:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 377871 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB3DFGvj012892 for ; Fri, 3 Dec 2010 13:15:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755769Ab0LCNPO (ORCPT ); Fri, 3 Dec 2010 08:15:14 -0500 Received: from perceval.ideasonboard.com ([95.142.166.194]:48869 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755379Ab0LCNPN (ORCPT ); Fri, 3 Dec 2010 08:15:13 -0500 Received: from localhost.localdomain (unknown [192.100.124.156]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DFB1F35C9E; Fri, 3 Dec 2010 13:15:11 +0000 (UTC) From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: hverkuil@xs4all.nl Subject: [PATCH FOR 2.6.37] v4l: Fix a use-before-set in the control framework Date: Fri, 3 Dec 2010 14:15:43 +0100 Message-Id: <1291382143-10460-1-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.7.2.2 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 03 Dec 2010 13:15:17 +0000 (UTC) diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c index 9d2502c..5f74fec0 100644 --- a/drivers/media/video/v4l2-ctrls.c +++ b/drivers/media/video/v4l2-ctrls.c @@ -1338,7 +1338,7 @@ int v4l2_queryctrl(struct v4l2_ctrl_handler *hdl, struct v4l2_queryctrl *qc) qc->minimum = ctrl->minimum; qc->maximum = ctrl->maximum; qc->default_value = ctrl->default_value; - if (qc->type == V4L2_CTRL_TYPE_MENU) + if (ctrl->type == V4L2_CTRL_TYPE_MENU) qc->step = 1; else qc->step = ctrl->step;