mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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: Fri, 7 Mar 2025 11:57:01 +0000	[thread overview]
Message-ID: <Z8rfDVow6hDeuZRS@kekkonen.localdomain> (raw)
In-Reply-To: <Z8rd3ipjkbaE4zfc@kekkonen.localdomain>

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.

> > +		return clk;
> > +
> > +	if (!is_acpi_node(dev_fwnode(dev)))
> > +		return ERR_PTR(-EINVAL);

How about -ENOENT? That's what devm_clk_get() returns when there's no such
clock.

-- 
Sakari Ailus

  reply	other threads:[~2025-03-07 11:57 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 [this message]
2025-03-10 12:11     ` Mehdi Djait
2025-03-10 12:56       ` Sakari Ailus

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=Z8rfDVow6hDeuZRS@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®