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]
Date:   Fri, 26 Nov 2021 13:05:09 +0000
From:   Mark Brown <broonie@...nel.org>
To:     Martin Kepplinger <martin.kepplinger@...i.sm>
Cc:     mchehab@...nel.org, sakari.ailus@...ux.intel.com, kernel@...i.sm,
        linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
        linux-pm@...r.kernel.org, Angus Ainslie <angus@...ea.ca>
Subject: Re: [PATCH v2] media: i2c: dw9714: add optional regulator support

On Fri, Nov 26, 2021 at 10:01:07AM +0100, Martin Kepplinger wrote:

> +	dw9714_dev->vcc = devm_regulator_get_optional(&client->dev, "vcc");
> +	if (IS_ERR(dw9714_dev->vcc)) {
> +		dev_dbg(&client->dev, "No vcc regulator found: %ld\n",
> +			PTR_ERR(dw9714_dev->vcc));
> +		dw9714_dev->vcc = NULL;
> +	}

To repeat my original feedback: unless the supply can be physically
absent you should use regulator_get().   The _optional variants are only
for cases where the supply might be physically absent.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ