From 416c29e9ce1347ba9a4ef7aeb4f30c8d9a3ada49 Mon Sep 17 00:00:00 2001 From: Adam Ward Date: Mon, 7 Dec 2020 17:15:15 +0000 Subject: regulator: da9121: Remove uninitialised string variable Erroneously left in when switched to using of_parse_cb() Signed-off-by: Adam Ward Link: https://lore.kernel.org/r/c7a9e947a9582fe0150d860b5eab7e093cd832bb.1607361013.git.Adam.Ward.opensource@diasemi.com Signed-off-by: Mark Brown --- drivers/regulator/da9121-regulator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/regulator/da9121-regulator.c b/drivers/regulator/da9121-regulator.c index db1c2cc838bc..ed68259bd952 100644 --- a/drivers/regulator/da9121-regulator.c +++ b/drivers/regulator/da9121-regulator.c @@ -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; } -- cgit From 9536ce63705952be5214544e3b048c78f932e794 Mon Sep 17 00:00:00 2001 From: Adam Ward Date: Mon, 7 Dec 2020 17:15:16 +0000 Subject: regulator: da9121: Fix index used for DT property Signed-off-by: Adam Ward Link: https://lore.kernel.org/r/2cf324b68d37c4059c7995e8cab5fc9a608ea65d.1607361013.git.Adam.Ward.opensource@diasemi.com Signed-off-by: Mark Brown --- drivers/regulator/da9121-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/regulator/da9121-regulator.c b/drivers/regulator/da9121-regulator.c index ed68259bd952..9d5b02fb1657 100644 --- a/drivers/regulator/da9121-regulator.c +++ b/drivers/regulator/da9121-regulator.c @@ -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; -- cgit