提交 9f1022b8 编写于 作者: T Thierry Reding

soc/tegra: fuse: Restore base on sysfs failure

Make sure to also restore the register base address on sysfs
registration failure.
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 c9e75376
......@@ -146,20 +146,24 @@ static int tegra_fuse_probe(struct platform_device *pdev)
if (fuse->soc->probe) {
err = fuse->soc->probe(fuse);
if (err < 0) {
fuse->base = base;
return err;
}
if (err < 0)
goto restore;
}
if (tegra_fuse_create_sysfs(&pdev->dev, fuse->soc->info->size,
fuse->soc->info))
return -ENODEV;
fuse->soc->info)) {
err = -ENODEV;
goto restore;
}
/* release the early I/O memory mapping */
iounmap(base);
return 0;
restore:
fuse->base = base;
return err;
}
static struct platform_driver tegra_fuse_driver = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册