Skip to content

Commit 0809d3d

Browse files
andredbroonie
authored andcommitted
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>
1 parent 7d33c0a commit 0809d3d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/regulator/s2mps11.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,8 +1207,8 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
12071207
struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
12081208
struct regulator_config config = { };
12091209
struct s2mps11_info *s2mps11;
1210-
unsigned int rdev_num = 0;
1211-
int i, ret = 0;
1210+
unsigned int rdev_num;
1211+
int i, ret;
12121212
const struct regulator_desc *regulators;
12131213

12141214
s2mps11 = devm_kzalloc(&pdev->dev, sizeof(struct s2mps11_info),

0 commit comments

Comments
 (0)