Commit 44455a6d authored by Lee Jones's avatar Lee Jones Committed by Mark Brown

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: default avatarLee 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.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f10a5e49
...@@ -254,6 +254,9 @@ static int tps65217_regulator_probe(struct platform_device *pdev) ...@@ -254,6 +254,9 @@ static int tps65217_regulator_probe(struct platform_device *pdev)
/* Store default strobe info */ /* Store default strobe info */
ret = tps65217_reg_read(tps, regulators[i].bypass_reg, &val); ret = tps65217_reg_read(tps, regulators[i].bypass_reg, &val);
if (ret)
return ret;
tps->strobes[i] = val & regulators[i].bypass_mask; tps->strobes[i] = val & regulators[i].bypass_mask;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment