[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250604-s2mpg1x-regulators-v1-9-6038740f49ae@linaro.org>
Date: Wed, 04 Jun 2025 16:25:48 +0100
From: André Draszik <andre.draszik@...aro.org>
To: Tudor Ambarus <tudor.ambarus@...aro.org>, Rob Herring <robh@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Krzysztof Kozlowski <krzk@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
Lee Jones <lee@...nel.org>, Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>
Cc: Peter Griffin <peter.griffin@...aro.org>,
Will McVicker <willmcvicker@...gle.com>, kernel-team@...roid.com,
linux-kernel@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
devicetree@...r.kernel.org, linux-gpio@...r.kernel.org,
André Draszik <andre.draszik@...aro.org>
Subject: [PATCH 09/17] 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.
Signed-off-by: André Draszik <andre.draszik@...aro.org>
---
drivers/regulator/s2mps11.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 04ae9c6150bd5ae9dba47b9b3cfcfb62e4698b6d..1f51fbc6c7b6e158f9707c04d9f030b9eee5e842 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -1207,8 +1207,8 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
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),
--
2.49.0.1204.g71687c7c1d-goog
Powered by blists - more mailing lists