mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] regulator: uniphier: Fix probe error handling
@ 2019-01-30  7:11 Axel Lin
  2019-01-30  7:11 ` [PATCH 2/2] regulator: uniphier: Constify uniphier_regulator_ops Axel Lin
  2019-01-30  9:05 ` [PATCH 1/2] regulator: uniphier: Fix probe error handling Kunihiko Hayashi
  0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2019-01-30  7:11 UTC (permalink / raw)
  To: Mark Brown; +Cc: Kunihiko Hayashi, Liam Girdwood, linux-kernel, Axel Lin

Ensure unwind all resources if probe fails.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/uniphier-regulator.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/uniphier-regulator.c b/drivers/regulator/uniphier-regulator.c
index abf22acbd13e..6ba0ae405f2b 100644
--- a/drivers/regulator/uniphier-regulator.c
+++ b/drivers/regulator/uniphier-regulator.c
@@ -87,8 +87,10 @@ static int uniphier_regulator_probe(struct platform_device *pdev)
 	}
 
 	regmap = devm_regmap_init_mmio(dev, base, priv->data->regconf);
-	if (IS_ERR(regmap))
-		return PTR_ERR(regmap);
+	if (IS_ERR(regmap)) {
+		ret = PTR_ERR(regmap);
+		goto out_rst_assert;
+	}
 
 	config.dev = dev;
 	config.driver_data = priv;
-- 
2.17.1


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

end of thread, other threads:[~2019-01-30  9:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-30  7:11 [PATCH 1/2] regulator: uniphier: Fix probe error handling Axel Lin
2019-01-30  7:11 ` [PATCH 2/2] regulator: uniphier: Constify uniphier_regulator_ops Axel Lin
2019-01-30  9:06   ` Kunihiko Hayashi
2019-01-30  9:05 ` [PATCH 1/2] regulator: uniphier: Fix probe error handling Kunihiko Hayashi

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®