mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
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>
This commit is contained in:
parent
d023377093
commit
33cd870c4b
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue