mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] regulator: max597x: Don't return uninitialized variable in .probe
@ 2022-07-14 10:12 Axel Lin
  2022-07-14 15:56 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2022-07-14 10:12 UTC (permalink / raw)
  To: Mark Brown; +Cc: Patrick Rudolph, Liam Girdwood, linux-kernel, Axel Lin

Remove the code checking and returning uninitialized variable.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/max597x-regulator.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/regulator/max597x-regulator.c b/drivers/regulator/max597x-regulator.c
index 5e09aa4213be..03c6027682d8 100644
--- a/drivers/regulator/max597x-regulator.c
+++ b/drivers/regulator/max597x-regulator.c
@@ -453,9 +453,6 @@ static int max597x_regulator_probe(struct platform_device *pdev)
 		data->num_switches = num_switches;
 		data->regmap = max597x->regmap;
 
-		if (ret < 0)
-			return ret;
-
 		ret = max597x_adc_range(data->regmap, i, &max597x->irng[i], &max597x->mon_rng[i]);
 		if (ret < 0)
 			return ret;
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-14 15:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-14 10:12 [PATCH] regulator: max597x: Don't return uninitialized variable in .probe Axel Lin
2022-07-14 15:56 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®