Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.12 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796292987; b=Du/5pdnQ/ySpPU8o/Irj61wetZUNVoQgNTAjHlx7af/B3iA5DkzUj7LSyJqcp9mdpFKB ewA0IRl7VmAI2L/k6On5G3jCthmbvhT0Lf65ww1mGrdyRY6HcxQH4Jsol0G7Dw92vyxeh J3tveKmIMYPw4P7wNul++Y+6i6pp4H0/SPL/Y2Ao90nGhnV+3xaLN6irKJSiQVzr2zDLL sk25Ue1c/v6R9LhfeHEBPBNEU0sMVHbg4+AxCwahCXCCOMbX1QnRVz1UGJsAFZ9c4KvTH 3FrVkeHPwHMp9xFlHQBgfFqNEK3Sy2T9FeGy3rn/SOL77L03UqVk3MrLYB6VSld2V1g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796292987; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Date: Organization:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=v3MAL4W06/IzfZaQofpNdNflf7tm+/RaOW0AlikMCKw=; b=Zlv5M6Io+M/pCmEmzsF5utnTVWx9Gb3PT//pnEMgL7RznvrQpdE1SoYbrIJMWAO/Udkr /kqVKiYU2hk91TViG5eQ20VRK9W4wwhtYJ3DNVihH/deVby0xTvN5XAzzA2U7LAl5DD2z UB0jwQPXkAPaEY+vgpXsSBv6zIdHfR7u+DikKxbSGXMhdD42QrQMPhCn2BipDg0Sb3cO4 x5ibHVjDkC1zCWg1xHgAdmc1TpeEPdEAKJ0kOpsib2jqwfPPGcdH5OUU7c9q1/VgzNYfm bhTgbD0Q+R2vxLP8ycpkIYAqvs6EcD3CWJ+yuo7cJnwSKGOCoRBjRyKtjB12jAejT+g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=dUQ9H9kd; arc=none smtp.remote-ip=192.198.163.12 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92193606A32C for ; Thu, 3 Dec 2026 10:16:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 92193606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=dUQ9H9kd DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796292987; x=1827828987; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=v3MAL4W06/IzfZaQofpNdNflf7tm+/RaOW0AlikMCKw=; b=dUQ9H9kdtDi6Kdw+GbfofXetL8V4zu2dC114QtwzAr04fJs63laqilDX yX+eLLnvXTZHpm58uA/6TcEspU2LjC2BqSaPYfswzROSo7S6K0tsHzNrY GFtEjhzBKrC0WVAPBdu7GqrqeIVfOLTZlDGSBB3GTJus93Lf8lZQW6zV2 RApLKgNOf9ahueszDm7enyx+5EBDjfLdRxalkkRj2deMAFjCNawdXgYIR g+2aM4c4AefJirs7IlcPyukq6hjvLoLwp1mhk6OJEw0Mo+XGuKD6ekz+3 Kn4CLcKC049aEASpNWwbqBqDaz66/344QQH7kNIigL8yxLNHahMpZ6wcF A==; X-CSE-ConnectionGUID: NZrYl7GiSyKJb+9/3eeHfg== X-CSE-MsgGUID: 7d2ibb47TJW7rUhUPqr1kQ== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5150448" X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="5150448" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 02:16:27 -0800 X-CSE-ConnectionGUID: ofi4YX7sTI6GGaHBZAi/jA== X-CSE-MsgGUID: ifNv8VmjQXiYtfDzwnx+0g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="13910271" Received: from mkosciow-mobl1.ger.corp.intel.com (HELO kekkonen.fi.intel.com) ([10.245.244.74]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 02:16:25 -0800 Received: from kekkonen.localdomain (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with SMTP id 486B31225B3; Thu, 03 Dec 2026 12:16:23 +0200 (EET) Date: Thu, 3 Dec 2026 12:16:23 +0200 Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo From: "sakari.ailus@linux.intel.com" To: "Sodhi, Vunny" Cc: Dave Stevenson , "linux-media@vger.kernel.org" Subject: Re: [PATCH v4 2/2] media: i2c: add isx031 sensor driver Message-ID: References: <20261202074143.3830501-1-vunny.sodhi@intel.com> <20261202074143.3830501-3-vunny.sodhi@intel.com> X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Vunny, Dave, On Thu, Dec 03, 2026 at 07:24:34AM +0000, Sodhi, Vunny wrote: > > > + /* Expose the orientation/rotation properties of the module. */ > > > + ret = v4l2_ctrl_new_fwnode_properties(hdl, &isx031_ctrl_ops, > > &props); > > > + if (ret) { > > > + v4l2_ctrl_handler_free(hdl); > > > + return ret; > > > + } > > > + > > > + link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; > > > + sensor->ctrl_exposure_auto->flags |= > > V4L2_CTRL_FLAG_EXECUTE_ON_WRITE; > > > + sensor->ctrl_exposure->flags |= > > > + V4L2_CTRL_FLAG_EXECUTE_ON_WRITE; > > > > There's no check that these three controls were created successfully and hence > > not NULL before the flags are set. > > Amend the > > if (ret) > > following v4l2_ctrl_new_fwnode_properties() to if (ret || ctrl_hdlr->error) > > would cover that. > > > > v4l2_ctrl_new_fwnode_properties() returns hdl->error straight away if an earlier control failed, > so ret is already non-zero in that case and we bail out before touching ->flags. > I'll switch to checking hdl->error directly to make that obvious. Please don't. The functions operating on control handler return the handler's error, including v4l2_ctrl_new_fwnode_properties(). -- Regards, Sakari Ailus