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: <20220618175530.2106129e@jic23-huawei>
Date:   Sat, 18 Jun 2022 17:55:30 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Luca Weiss <luca.weiss@...rphone.com>
Cc:     linux-iio@...r.kernel.org, ~postmarketos/upstreaming@...ts.sr.ht,
        phone-devel@...r.kernel.org,
        Song Qiang <songqiang1304521@...il.com>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Markuss Broks <markuss.broks@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] proximity: vl53l0x: Make VDD regulator actually
 optional

On Tue, 14 Jun 2022 13:20:50 +0200
Luca Weiss <luca.weiss@...rphone.com> wrote:

> Contrary to what the naming might suggest, devm_regulator_get_optional
> returns -ENODEV in case the regulator is not found which will trigger
> probe error in this driver.
> 
> Use devm_regulator_get instead which will return a dummy regulator that
> we can just use as if it was a proper regulator.
> 
> Fixes: d3d6dba56dab ("proximity: vl53l0x: Handle the VDD regulator")
> Signed-off-by: Luca Weiss <luca.weiss@...rphone.com>
> ---
> @Jonathan: As discussed in the other email, maybe you want to
> adjust/remove the "Fixes:" tag. Your call.
Applied to the togreg branch of iio.git.

> 
>  drivers/iio/proximity/vl53l0x-i2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/proximity/vl53l0x-i2c.c b/drivers/iio/proximity/vl53l0x-i2c.c
> index 3b7a33ff601d..c7c4d33d340f 100644
> --- a/drivers/iio/proximity/vl53l0x-i2c.c
> +++ b/drivers/iio/proximity/vl53l0x-i2c.c
> @@ -237,7 +237,7 @@ static int vl53l0x_probe(struct i2c_client *client)
>  				     I2C_FUNC_SMBUS_BYTE_DATA))
>  		return -EOPNOTSUPP;
>  
> -	data->vdd_supply = devm_regulator_get_optional(&client->dev, "vdd");
> +	data->vdd_supply = devm_regulator_get(&client->dev, "vdd");
>  	if (IS_ERR(data->vdd_supply))
>  		return dev_err_probe(&client->dev, PTR_ERR(data->vdd_supply),
>  				     "Unable to get VDD regulator\n");

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ