From patchwork Mon Oct 23 17:30:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10022889 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2AAA5601E8 for ; Mon, 23 Oct 2017 17:30:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AEBB28909 for ; Mon, 23 Oct 2017 17:30:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F3A052887A; Mon, 23 Oct 2017 17:30:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AD6F288DA for ; Mon, 23 Oct 2017 17:30:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751417AbdJWRap (ORCPT ); Mon, 23 Oct 2017 13:30:45 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:46030 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751280AbdJWRao (ORCPT ); Mon, 23 Oct 2017 13:30:44 -0400 Received: by mail-pg0-f67.google.com with SMTP id b192so12308113pga.2 for ; Mon, 23 Oct 2017 10:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=YRhvjegvM0BZwBEEaCWfoNE7EBfgyCQcc8cxWRj163g=; b=RQt8w9tnCoB9MKEz/oKf9iOFuh/qQzfqUSR5OQiKzHOVodNMjkNJ+2yGToUw7aqFPX l35maOg9Azam6da9HXzZMcP6qCrvuxqlVWu4QUFWymM/tIdkpXHM0KpdQvy8xb+6nYCU BQUDXmeVliIFwnUordLF+Uq6zN/0cV639Q/yZa43jm0MsgBYa0uPUzSGS80/a87cVMI3 +iqZ5MnP7Moe3g3/qKBCv647W4zmq4/MtBC1cPjp2Hfun/bPiP7GnEkzKGZ+DPVEGJE+ 5giU59tgpSaWHzLFphlmmBWNUFgc5KRYZ+ic32l9Y4j08JvLyIpQ+xIYpaigf+wzLm4Q Heuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=YRhvjegvM0BZwBEEaCWfoNE7EBfgyCQcc8cxWRj163g=; b=gY+6CDaQ8p1DbWDUQiF6KQAcM/U+vwTH37BXrps9gtt3Kha8mTCU32/pB5He93gh+2 wBgybvVklro+hH2HdySZr9qWXe1TqxErIHcsKSBYxSqONP0lx64hVftGpDzfTuy0Fv0g 24LzSeJEPt/W9DtOFe5WHIuadBuzbK5aFvNtR5J09ifTK6TgfkZqQz7h0TAPMXKZt/Gw l9wBjZNcroeC4bD9Sp8lz3ANA3st/XpF4lHLXFm2wTq1FX2bQFF8e0DoPg2UWoZi5H9T VuuCo5cTtmnzsVhZ/BOdAseXCUM4fQs2qGjbFYZ4jKKYrRD9H7R8x3F+u9vxFjKlZddt nnOA== X-Gm-Message-State: AMCzsaUzADF5I1YHXGEKSJEIgcAQvycbK334X0e/WAlnztLLmnT3B6Sg K2CtsaqFy9YYwRly2KaSb8WuPg== X-Google-Smtp-Source: ABhQp+Qt9z9Wjt1k9pQXhdSXM+wvfZ2rJG5BtxSsLDyi0dHWOQ1641Er+DuWPWO2Sy79Dp/KKSWlBw== X-Received: by 10.84.178.101 with SMTP id y92mr10658235plb.83.1508779843857; Mon, 23 Oct 2017 10:30:43 -0700 (PDT) Received: from localhost.localdomain ([240f:4:c2bc:1:5462:86a3:43a:bdf1]) by smtp.gmail.com with ESMTPSA id u186sm11978436pgb.84.2017.10.23.10.30.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Oct 2017 10:30:42 -0700 (PDT) From: Akinobu Mita To: linux-media@vger.kernel.org Cc: Akinobu Mita , Sylwester Nawrocki , Mauro Carvalho Chehab Subject: [PATCH] media: ov9650: remove unnecessary terminated entry in menu items array Date: Tue, 24 Oct 2017 02:30:26 +0900 Message-Id: <1508779826-12499-1-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The test_pattern_menu[] array has two valid items and a null terminated item. So the control's maximum value which is passed to v4l2_ctrl_new_std_menu_items() should be one. However, 'ARRAY_SIZE(test_pattern_menu) - 1' is actually passed and it's not correct. Fix it by removing unnecessary terminated entry and let the correct control's maximum value be passed to v4l2_ctrl_new_std_menu_items(). Cc: Sylwester Nawrocki Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov9650.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/i2c/ov9650.c b/drivers/media/i2c/ov9650.c index 6ffb460..69433e1 100644 --- a/drivers/media/i2c/ov9650.c +++ b/drivers/media/i2c/ov9650.c @@ -985,7 +985,6 @@ static const struct v4l2_ctrl_ops ov965x_ctrl_ops = { static const char * const test_pattern_menu[] = { "Disabled", "Color bars", - NULL }; static int ov965x_initialize_controls(struct ov965x *ov965x)