From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Mehdi Djait <mehdi.djait@linux.intel.com>
Cc: laurent.pinchart@ideasonboard.com,
tomi.valkeinen@ideasonboard.com, jacopo.mondi@ideasonboard.com,
hverkuil@xs4all.nl, kieran.bingham@ideasonboard.com,
naush@raspberrypi.com, mchehab@kernel.org, hdegoede@redhat.com,
dave.stevenson@raspberrypi.com, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v1] media: v4l2-common: Add a helper for obtaining the clock producer
Date: Mon, 10 Mar 2025 12:56:30 +0000 [thread overview]
Message-ID: <Z87hflLo9Oz3kWja@kekkonen.localdomain> (raw)
In-Reply-To: <hg2es6fl4yty3zo6gvf6xabw6kzztaz6awqslvxvumn5hhhsq5@d6xz7khblt7u>
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
prev parent reply other threads:[~2025-03-10 12:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-27 9:26 Mehdi Djait
2025-02-27 9:35 ` Mehdi Djait
2025-03-07 11:51 ` Sakari Ailus
2025-03-07 11:57 ` Sakari Ailus
2025-03-10 12:11 ` Mehdi Djait
2025-03-10 12:56 ` Sakari Ailus [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z87hflLo9Oz3kWja@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=hdegoede@redhat.com \
--cc=hverkuil@xs4all.nl \
--cc=jacopo.mondi@ideasonboard.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=mehdi.djait@linux.intel.com \
--cc=naush@raspberrypi.com \
--cc=tomi.valkeinen@ideasonboard.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®