summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChiYuan Huang <cy_huang@richtek.com>2024-10-25 13:59:18 +0800
committerMark Brown <broonie@kernel.org>2024-10-25 14:10:19 +0100
commit2feb023110843acce790e9089e72e9a9503d9fa5 (patch)
tree198a0a78545e1db6f95b6384b1ebf5aeda1eec9e
parent8e929cb546ee42c9a61d24fae60605e9e3192354 (diff)
downloadlinux-stable-2feb023110843acce790e9089e72e9a9503d9fa5.tar.gz
linux-stable-2feb023110843acce790e9089e72e9a9503d9fa5.tar.bz2
linux-stable-2feb023110843acce790e9089e72e9a9503d9fa5.zip
regulator: rtq2208: Fix uninitialized use of regulator_config
Fix rtq2208 driver uninitialized use to cause kernel error. Fixes: 85a11f55621a ("regulator: rtq2208: Add Richtek RTQ2208 SubPMIC") Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://patch.msgid.link/00d691cfcc0eae9ce80a37b62e99851e8fdcffe2.1729829243.git.cy_huang@richtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/regulator/rtq2208-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/rtq2208-regulator.c b/drivers/regulator/rtq2208-regulator.c
index a5c126afc648..5925fa7a9a06 100644
--- a/drivers/regulator/rtq2208-regulator.c
+++ b/drivers/regulator/rtq2208-regulator.c
@@ -568,7 +568,7 @@ static int rtq2208_probe(struct i2c_client *i2c)
struct regmap *regmap;
struct rtq2208_regulator_desc *rdesc[RTQ2208_LDO_MAX];
struct regulator_dev *rdev;
- struct regulator_config cfg;
+ struct regulator_config cfg = {};
struct rtq2208_rdev_map *rdev_map;
int i, ret = 0, idx, n_regulator = 0;
unsigned int regulator_idx_table[RTQ2208_LDO_MAX],