Skip to content

Commit 463e133

Browse files
committed
Merge tag 'regulator-fix-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fixes from Mark Brown: "A small pile of fixes, none of which are super major - the code fixes are improved error handling and fixing a leak of a device node. We also have a typo fix and an improvement to make the binding example for mt6359 more directly usable" * tag 'regulator-fix-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: Kconfig: fix a typo regulator: bq257xx: Fix device node reference leak in bq257xx_reg_dt_parse_gpio() regulator: fp9931: Fix PM runtime reference leak in fp9931_hwmon_read() regulator: tps65185: check devm_kzalloc() result in probe regulator: dt-bindings: mt6359: make regulator names unique
2 parents 201795a + bfd7db7 commit 463e133

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ examples:
287287
regulator-max-microvolt = <1700000>;
288288
};
289289
mt6359_vrfck_1_ldo_reg: ldo_vrfck_1 {
290-
regulator-name = "vrfck";
290+
regulator-name = "vrfck_1";
291291
regulator-min-microvolt = <1240000>;
292292
regulator-max-microvolt = <1600000>;
293293
};
@@ -309,7 +309,7 @@ examples:
309309
regulator-max-microvolt = <3300000>;
310310
};
311311
mt6359_vemc_1_ldo_reg: ldo_vemc_1 {
312-
regulator-name = "vemc";
312+
regulator-name = "vemc_1";
313313
regulator-min-microvolt = <2500000>;
314314
regulator-max-microvolt = <3300000>;
315315
};

drivers/regulator/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ config REGULATOR_FP9931
508508
This driver supports the FP9931/JD9930 voltage regulator chip
509509
which is used to provide power to Electronic Paper Displays
510510
so it is found in E-Book readers.
511-
If HWWON is enabled, it also provides temperature measurement.
511+
If HWMON is enabled, it also provides temperature measurement.
512512

513513
config REGULATOR_LM363X
514514
tristate "TI LM363X voltage regulators"

drivers/regulator/bq257xx-regulator.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,10 @@ static void bq257xx_reg_dt_parse_gpio(struct platform_device *pdev)
115115
return;
116116

117117
subchild = of_get_child_by_name(child, pdata->desc.of_match);
118+
of_node_put(child);
118119
if (!subchild)
119120
return;
120121

121-
of_node_put(child);
122-
123122
pdata->otg_en_gpio = devm_fwnode_gpiod_get_index(&pdev->dev,
124123
of_fwnode_handle(subchild),
125124
"enable", 0,

drivers/regulator/fp9931.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,12 @@ static int fp9931_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
144144
return ret;
145145

146146
ret = regmap_read(data->regmap, FP9931_REG_TMST_VALUE, &val);
147-
if (ret)
148-
return ret;
147+
if (!ret)
148+
*temp = (s8)val * 1000;
149149

150150
pm_runtime_put_autosuspend(data->dev);
151-
*temp = (s8)val * 1000;
152151

153-
return 0;
152+
return ret;
154153
}
155154

156155
static umode_t fp9931_hwmon_is_visible(const void *data,

drivers/regulator/tps65185.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,9 @@ static int tps65185_probe(struct i2c_client *client)
332332
int i;
333333

334334
data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL);
335+
if (!data)
336+
return -ENOMEM;
337+
335338
data->regmap = devm_regmap_init_i2c(client, &regmap_config);
336339
if (IS_ERR(data->regmap))
337340
return dev_err_probe(&client->dev, PTR_ERR(data->regmap),

0 commit comments

Comments
 (0)