summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2020-06-26 07:57:35 +0100
committerMark Brown <broonie@kernel.org>2020-06-26 15:34:22 +0100
commit44455a6d3bcab53ae8330a009d513ade0f12c0c0 (patch)
treebdec81472f913a54d43dd3b213bb574a8c964bd5 /drivers
parentf10a5e499cf3e0978845cd85d8a375bcfa193907 (diff)
regulator: tps65217-regulator: Use the returned value of tps65217_reg_read()
Until now the aforementioned return value has been ignored. Previous and current calls to tps65217_reg_read() return instantly when the value is not 0, so let's do that. Fixes the following W=1 warning: drivers/regulator/tps65217-regulator.c: In function ‘tps65217_regulator_probe’: drivers/regulator/tps65217-regulator.c:227:9: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 227 | int i, ret; | ^~~ Signed-off-by: Lee Jones <lee.jones@linaro.org> Cc: Russ Dill <Russ.Dill@ti.com> Cc: Keerthy <j-keerthy@ti.com> Cc: AnilKumar Ch <anilkumar@ti.com> Cc: linux-omap@vger.kernel.org Link: https://lore.kernel.org/r/20200626065738.93412-7-lee.jones@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/regulator/tps65217-regulator.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c
index f2d3a4a9f3e7..3f5ea029e2e3 100644
--- a/drivers/regulator/tps65217-regulator.c
+++ b/drivers/regulator/tps65217-regulator.c
@@ -254,6 +254,9 @@ static int tps65217_regulator_probe(struct platform_device *pdev)
/* Store default strobe info */
ret = tps65217_reg_read(tps, regulators[i].bypass_reg, &val);
+ if (ret)
+ return ret;
+
tps->strobes[i] = val & regulators[i].bypass_mask;
}