soc: mediatek: PMIC wrap: Fix error handling
According to error handling in this function, it is likely that going to 'err_out2' was expected here. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
This commit is contained in:
Родитель
36c310f55b
Коммит
f282693f80
|
@ -1200,7 +1200,8 @@ static int pwrap_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
if (!(pwrap_readl(wrp, PWRAP_WACS2_RDATA) & PWRAP_STATE_INIT_DONE0)) {
|
if (!(pwrap_readl(wrp, PWRAP_WACS2_RDATA) & PWRAP_STATE_INIT_DONE0)) {
|
||||||
dev_dbg(wrp->dev, "initialization isn't finished\n");
|
dev_dbg(wrp->dev, "initialization isn't finished\n");
|
||||||
return -ENODEV;
|
ret = -ENODEV;
|
||||||
|
goto err_out2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize watchdog, may not be done by the bootloader */
|
/* Initialize watchdog, may not be done by the bootloader */
|
||||||
|
@ -1220,8 +1221,10 @@ static int pwrap_probe(struct platform_device *pdev)
|
||||||
goto err_out2;
|
goto err_out2;
|
||||||
|
|
||||||
wrp->regmap = devm_regmap_init(wrp->dev, NULL, wrp, &pwrap_regmap_config);
|
wrp->regmap = devm_regmap_init(wrp->dev, NULL, wrp, &pwrap_regmap_config);
|
||||||
if (IS_ERR(wrp->regmap))
|
if (IS_ERR(wrp->regmap)) {
|
||||||
return PTR_ERR(wrp->regmap);
|
ret = PTR_ERR(wrp->regmap);
|
||||||
|
goto err_out2;
|
||||||
|
}
|
||||||
|
|
||||||
ret = of_platform_populate(np, NULL, NULL, wrp->dev);
|
ret = of_platform_populate(np, NULL, NULL, wrp->dev);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче