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
|
@ -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 New Issue