Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

regulator: s2mps11: drop two needless variable initialisations

The initialisations being removed are needless, as both variables are
being assigned values unconditionally further down. Additionally, doing
this eager init here might lead to preventing the compiler from issuing
a warning if a future code change actually forgets to assign a useful
value in some code path.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://patch.msgid.link/20260122-s2mpg1x-regulators-v7-11-3b1f9831fffd@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

André Draszik and committed by
Mark Brown
0809d3dc 7d33c0a4

+2 -2
+2 -2
drivers/regulator/s2mps11.c
··· 1207 1207 struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); 1208 1208 struct regulator_config config = { }; 1209 1209 struct s2mps11_info *s2mps11; 1210 - unsigned int rdev_num = 0; 1211 - int i, ret = 0; 1210 + unsigned int rdev_num; 1211 + int i, ret; 1212 1212 const struct regulator_desc *regulators; 1213 1213 1214 1214 s2mps11 = devm_kzalloc(&pdev->dev, sizeof(struct s2mps11_info),