]> www.infradead.org Git - linux.git/commitdiff
regulator: rtq2208: Fix uninitialized use of regulator_config
authorChiYuan Huang <cy_huang@richtek.com>
Fri, 25 Oct 2024 05:59:18 +0000 (13:59 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 25 Oct 2024 13:10:19 +0000 (14:10 +0100)
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>
drivers/regulator/rtq2208-regulator.c

index a5c126afc648c511d643e5dd8134565d34d0d89e..5925fa7a9a06f0aa675bdc652bfbb58ee2b12462 100644 (file)
@@ -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],