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: <Z8rfDVow6hDeuZRS@kekkonen.localdomain>
Date: Fri, 7 Mar 2025 11:57:01 +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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ