lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aG0Yt4bewAgqsYLd@smile.fi.intel.com>
Date: Tue, 8 Jul 2025 16:10:15 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Hardevsinh Palaniya <hardevsinh.palaniya@...iconsignals.io>
Cc: "sakari.ailus@...ux.intel.com" <sakari.ailus@...ux.intel.com>,
	Himanshu Bhavani <himanshu.bhavani@...iconsignals.io>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Hans Verkuil <hverkuil@...all.nl>,
	André Apitzsch <git@...tzsch.eu>,
	Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
	Hans de Goede <hansg@...nel.org>,
	Tarang Raval <tarang.raval@...iconsignals.io>,
	Jingjing Xiong <jingjing.xiong@...el.com>,
	Dongcheng Yan <dongcheng.yan@...el.com>,
	Sylvain Petinot <sylvain.petinot@...s.st.com>,
	Benjamin Mugnier <benjamin.mugnier@...s.st.com>,
	Matthias Fend <matthias.fend@...end.at>,
	Arnd Bergmann <arnd@...db.de>,
	Heimir Thor Sverrisson <heimir.sverrisson@...il.com>,
	"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] media: i2c: add ov2735 image sensor driver

On Tue, Jul 08, 2025 at 07:04:48AM +0000, Hardevsinh Palaniya wrote:
> > On Mon, Jul 07, 2025 at 08:31:06PM +0530, Hardevsinh Palaniya wrote:

...

> > > +static int ov2735_disable_streams(struct v4l2_subdev *sd,
> > > +                               struct v4l2_subdev_state *state, u32 pad,
> > > +                               u64 streams_mask)
> > > +{
> > > +     struct ov2735 *ov2735 = to_ov2735(sd);
> > > +     int ret = 0;
> > > +
> > > +     /* set stream off register */
> > > +     ret = cci_write(ov2735->cci, OV2735_REG_PAGE_SELECT, 0x01, NULL);
> > > +     ret |= cci_write(ov2735->cci, OV2735_REG_STREAM_CTRL, OV2735_STREAM_OFF, NULL);
> > 
> > Why not using the ret parameter? Same for other similar cases above and beyond.
> 
> I am not sure what you want to suggest here.
> 
> Do I need to check ret like this?
> 
> ret = cci_write(ov2735->cci, OV2735_REG_PAGE_SELECT, 0x01, NULL);
> if (ret) {
>     // error message
> }
> 
> ret = cci_write(ov2735->cci, OV2735_REG_STREAM_CTRL, OV2735_STREAM_OFF, NULL);
> if (ret) {
>     // error message
> }

No, this is the idea behind it, you check only when you need it.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ