Skip to contentSkip to conversation

regulator: da9121: bug fixes

PATCH In review Adam Ward 2 participants 4 messages Dec 7, 2020 – Dec 8, 2020

Subsystems (2)
lore
Share & tools
lore

Adam Ward

author
#0 lore raw

cover regulator: da9121: bug fixes

This patch fixes a couple of bugs in the DA9121 driver.
One in an uninialised string I forgot to remove when changing to of_parse_cb() The other is an index for an optional DT property which overflows

Adam Ward (2):
regulator: da9121: Remove uninitialised string variable
regulator: da9121: Fix index used for DT property

 drivers/regulator/da9121-regulator.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/2 regulator: da9121: Remove uninitialised string variable

Erroneously left in when switched to using of_parse_cb()

---
 drivers/regulator/da9121-regulator.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/regulator/da9121-regulator.c +1 -2
index db1c2cc..ed68259 100644
@@ -816,7 +816,6 @@ static int da9121_check_device_type(struct i2c_client *i2c, struct da9121 *chip)
 	u32 variant_id;
 	u8 variant_mrc, variant_vrc;
 	char *type;
-	const char *name;
 	bool config_match = false;
 	int ret = 0;
 
@@ -867,7 +866,7 @@ static int da9121_check_device_type(struct i2c_client *i2c, struct da9121 *chip)
 		 device_id, variant_id, type);
 
 	if (!config_match) {
-		dev_err(chip->dev, "Device tree configuration '%s' does not match detected device.\n", name);
+		dev_err(chip->dev, "Device tree configuration does not match detected device.\n");
 		ret = -EINVAL;
 		goto error;
 	}
Signature · 1 line
1.9.1
author
#2 lore raw

PATCH 2/2 regulator: da9121: Fix index used for DT property

In reply to Adam Ward
---
 drivers/regulator/da9121-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/da9121-regulator.c +1 -1
index ed68259..9d5b02f 100644
@@ -381,7 +381,7 @@ static int da9121_of_parse_cb(struct device_node *np,
 		uint32_t ripple_reg;
 		int ret;
 
-		if (of_property_read_u32(da9121_matches[pdata->num_buck].of_node,
+		if (of_property_read_u32(da9121_matches[pdata->num_buck-1].of_node,
 				"dlg,ripple-cancel", &ripple_cancel)) {
 			if (pdata->num_buck > 1)
 				ripple_reg = DA9xxx_REG_BUCK_BUCK2_7;
Signature · 1 line
1.9.1
maintainer
#3 lore raw
In reply to Adam Ward
Quoted 10 lines · Adam Ward

This patch fixes a couple of bugs in the DA9121 driver.
One in an uninialised string I forgot to remove when changing to of_parse_cb() The other is an index for an optional DT property which overflows

Adam Ward (2):
regulator: da9121: Remove uninitialised string variable
regulator: da9121: Fix index used for DT property

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/2] regulator: da9121: Remove uninitialised string variable

      commit: 416c29e9ce1347ba9a4ef7aeb4f30c8d9a3ada49
[2/2] regulator: da9121: Fix index used for DT property
      commit: 9536ce63705952be5214544e3b048c78f932e794

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark