[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z87hflLo9Oz3kWja@kekkonen.localdomain>
Date: Mon, 10 Mar 2025 12:56:30 +0000
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Mehdi Djait <mehdi.djait@...ux.intel.com>
Cc: laurent.pinchart@...asonboard.com, tomi.valkeinen@...asonboard.com,
jacopo.mondi@...asonboard.com, hverkuil@...all.nl,
kieran.bingham@...asonboard.com, naush@...pberrypi.com,
mchehab@...nel.org, hdegoede@...hat.com,
dave.stevenson@...pberrypi.com, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v1] media: v4l2-common: Add a helper for obtaining
the clock producer
Hi Mehdi,
On Mon, Mar 10, 2025 at 01:11:33PM +0100, Mehdi Djait wrote:
> Hi Sakari,
>
> On Fri, Mar 07, 2025 at 11:57:01AM +0000, Sakari Ailus wrote:
> > On Fri, Mar 07, 2025 at 11:51:58AM +0000, Sakari Ailus wrote:
> > > > + int ret;
> > > > +
> > > > + clk = devm_clk_get_optional(dev, id);
> > > > + if (clk || IS_ERR(clk))
> >
> > I forgot this bit earlier. The IS_ERR() check is redundant.
> >
>
> Wouldn't you say that this helps with readability even if it is
> redundant ? This will warn the users of this helper that the call
> may fail and return early ?
If you want to note that the returned clk may be valid or an error, I'd add
a comment for it.
--
Regards,
Sakari Ailus
Powered by blists - more mailing lists