From patchwork Thu Jan 27 12:31:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 511681 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 p0RCWnRI004009 for ; Thu, 27 Jan 2011 12:32:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753399Ab1A0Mbt (ORCPT ); Thu, 27 Jan 2011 07:31:49 -0500 Received: from perceval.ideasonboard.com ([95.142.166.194]:59832 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753490Ab1A0MbY (ORCPT ); Thu, 27 Jan 2011 07:31:24 -0500 Received: from localhost.localdomain (unknown [91.178.11.103]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4A3DF35CC0; Thu, 27 Jan 2011 12:31:12 +0000 (UTC) From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: sakari.ailus@maxwell.research.nokia.com Subject: [PATCH v1 4/8] v4l: Fix a use-before-set in the control framework Date: Thu, 27 Jan 2011 13:31:08 +0100 Message-Id: <1296131472-30045-5-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1296131472-30045-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1296131472-30045-1-git-send-email-laurent.pinchart@ideasonboard.com> 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.6 (demeter1.kernel.org [140.211.167.41]); Thu, 27 Jan 2011 12:32:55 +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;