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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 26 Jun 2012 18:30:16 +0800
From:	Axel Lin <axel.lin@...il.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	Liam Girdwood <lrg@...com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] regulator: core: Only delay if we successfully set
 the voltage

2012/6/26 Mark Brown <broonie@...nsource.wolfsonmicro.com>:
> There is no need to wait for the voltage to ramp if we didn't manage to
> set it.
>
> Signed-off-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>
> ---
>  drivers/regulator/core.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index 30ecb49..9f28f2f 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -2131,7 +2131,8 @@ static int _regulator_do_set_voltage(struct regulator_dev *rdev,
>                best_val = _regulator_get_voltage(rdev);
>
>        /* Call set_voltage_time_sel if successfully obtained old_selector */
> -       if (_regulator_is_enabled(rdev) && ret == 0 && old_selector >= 0 &&
                                                                  ^^^^^^^^
                                                                 We
already check ret ==0 here.
> +       if (ret == 0 &&
> +           _regulator_is_enabled(rdev) && ret == 0 && old_selector >= 0 &&
>            rdev->desc->ops->set_voltage_time_sel) {
>
>                delay = rdev->desc->ops->set_voltage_time_sel(rdev,
> --
> 1.7.10
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ