From patchwork Fri Jul 14 10:43:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 9840515 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 18D86602BD for ; Fri, 14 Jul 2017 10:43:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0679C28752 for ; Fri, 14 Jul 2017 10:43:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF70F2876E; Fri, 14 Jul 2017 10:43:08 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 072E028752 for ; Fri, 14 Jul 2017 10:43:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753691AbdGNKnH (ORCPT ); Fri, 14 Jul 2017 06:43:07 -0400 Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:58476 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753486AbdGNKnG (ORCPT ); Fri, 14 Jul 2017 06:43:06 -0400 Received: from valkosipuli.localdomain (valkosipuli.retiisi.org.uk [IPv6:2001:1bc8:1a6:d3d5::80:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id 516FC600BF; Fri, 14 Jul 2017 13:43:02 +0300 (EEST) Received: from sakke by valkosipuli.localdomain with local (Exim 4.89) (envelope-from ) id 1dVy3p-0005vZ-RX; Fri, 14 Jul 2017 13:43:01 +0300 Date: Fri, 14 Jul 2017 13:43:01 +0300 From: Sakari Ailus To: Chiranjeevi Rapolu Cc: linux-media@vger.kernel.org, sakari.ailus@linux.intel.com, jian.xu.zheng@intel.com, rajmohan.mani@intel.com, hyungwoo.yang@intel.com Subject: Re: [PATCH v5 1/1] i2c: Add Omnivision OV5670 5M sensor support Message-ID: <20170714104301.bbzd2xqgymhkwocr@valkosipuli.retiisi.org.uk> References: <1497404348-16255-1-git-send-email-chiranjeevi.rapolu@intel.com> <2b5e2ec73d2a5976a3c56dd35d90ca681f803ce0.1499996475.git.chiranjeevi.rapolu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2b5e2ec73d2a5976a3c56dd35d90ca681f803ce0.1499996475.git.chiranjeevi.rapolu@intel.com> User-Agent: NeoMutt/20170113 (1.7.2) 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 Hi Chiranjeevi, On Thu, Jul 13, 2017 at 06:51:27PM -0700, Chiranjeevi Rapolu wrote: > Provides single source pad with up to 2592x1944 pixels at 10-bit raw > bayer format over MIPI CSI2 two lanes at 840Mbps/lane. > The driver supports following features: > - up to 30fps at 5M pixels > - manual exposure > - digital/analog gain > - V-blank/H-blank > - test pattern > - media controller > - runtime pm > > Signed-off-by: Chiranjeevi Rapolu Thanks, applied with the following change: v4l2_ctrl_new_std() may return NULL, you always need to check for that if you're using the returned result. diff --git a/drivers/media/i2c/ov5670.c b/drivers/media/i2c/ov5670.c index 909095ac90a2..7de80645dd6f 100644 --- a/drivers/media/i2c/ov5670.c +++ b/drivers/media/i2c/ov5670.c @@ -2060,7 +2060,8 @@ static int ov5670_init_controls(struct ov5670 *ov5670) &ov5670_ctrl_ops, V4L2_CID_LINK_FREQ, 0, 0, link_freq_menu_items); - ov5670->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; + if (ov5670->link_freq) + ov5670->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; /* By default, V4L2_CID_PIXEL_RATE is read only */ ov5670->pixel_rate = v4l2_ctrl_new_std(ctrl_hdlr, &ov5670_ctrl_ops,