diff options
author | Axel Lin <axel.lin@ingics.com> | 2019-01-30 08:11:09 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-02-02 17:00:04 +0100 |
commit | 33cd870c4bf148163e8b7c6e3bac2a44658a04e4 (patch) | |
tree | 1fc3c1c9ca7414b41bae068311d8d5914c1b30a6 /drivers/regulator/uniphier-regulator.c | |
parent | regulator: axp20x: Fix incorrect vsel_mask settings (diff) | |
download | linux-33cd870c4bf148163e8b7c6e3bac2a44658a04e4.tar.xz linux-33cd870c4bf148163e8b7c6e3bac2a44658a04e4.zip |
regulator: uniphier: Fix probe error handling
Ensure unwind all resources if probe fails.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/uniphier-regulator.c')
-rw-r--r-- | drivers/regulator/uniphier-regulator.c | 6 |
1 files 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; |