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:   Thu, 20 May 2021 01:12:24 +0300
From:   Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To:     Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>
Cc:     Michał Mirosław <mirq-linux@...e.qmqm.pl>,
        linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] regulator: core: always use enable_delay when enabling regulators

Some regulators (e.g. fixed) do not have .enable callback per se, but
use supply regulator and enable_delay. Do not return early from
_regulator_do_enable in such cases, so that enable_delay is properly
handled.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
---
 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 e20e77e4c159..66c465bd00ca 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2516,7 +2516,8 @@ static int _regulator_do_enable(struct regulator_dev *rdev)
 		ret = rdev->desc->ops->enable(rdev);
 		if (ret < 0)
 			return ret;
-	} else {
+	} else if (!rdev->supply) {
+		/* Still handle delay if the regulator was just turned on using the supply */
 		return -EINVAL;
 	}
 
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ