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>
struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
struct regulator_config config = { };
struct s2mps11_info *s2mps11;
- unsigned int rdev_num = 0;
- int i, ret = 0;
+ unsigned int rdev_num;
+ int i, ret;
const struct regulator_desc *regulators;
s2mps11 = devm_kzalloc(&pdev->dev, sizeof(struct s2mps11_info),