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>] [day] [month] [year] [list]
Message-ID: <tencent_F05F5B0860B41E180AA0A88B1279376CB508@qq.com>
Date:   Sun, 23 Jul 2023 15:23:01 +0800
From:   Zhang Shurong <zhang_shurong@...mail.com>
To:     oder_chiou@...ltek.com
Cc:     lgirdwood@...il.com, broonie@...nel.org, perex@...ex.cz,
        tiwai@...e.com, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org,
        Zhang Shurong <zhang_shurong@...mail.com>
Subject: [PATCH] ASoC: rt5668: add missed regulator_bulk_disable

The driver forgets to call regulator_bulk_disable()

Add the missed call to fix it.

Fixes: d59fb2856223 ("ASoC: rt5668: add rt5668B codec driver")
Signed-off-by: Zhang Shurong <zhang_shurong@...mail.com>
---
 sound/soc/codecs/rt5668.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/sound/soc/codecs/rt5668.c b/sound/soc/codecs/rt5668.c
index f04c810fd710..d66c9e9b9185 100644
--- a/sound/soc/codecs/rt5668.c
+++ b/sound/soc/codecs/rt5668.c
@@ -2452,6 +2452,13 @@ static void rt5668_calibrate(struct rt5668_priv *rt5668)
 
 }
 
+static void rt5668_i2c_disable_regulators(void *data)
+{
+	struct rt5668_priv *rt5668 = data;
+
+	regulator_bulk_disable(ARRAY_SIZE(rt5668->supplies), rt5668->supplies);
+}
+
 static int rt5668_i2c_probe(struct i2c_client *i2c)
 {
 	struct rt5668_platform_data *pdata = dev_get_platdata(&i2c->dev);
@@ -2490,6 +2497,11 @@ static int rt5668_i2c_probe(struct i2c_client *i2c)
 		return ret;
 	}
 
+	ret = devm_add_action_or_reset(&i2c->dev, rt5668_i2c_disable_regulators,
+			rt5668);
+	if (ret)
+		return ret;
+
 	ret = regulator_bulk_enable(ARRAY_SIZE(rt5668->supplies),
 				    rt5668->supplies);
 	if (ret != 0) {
-- 
2.41.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ