mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
power: reset: zx-reboot: Unmap region obtained by of_iomap
Free memory mapping, if probe is not successful. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
This commit is contained in:
parent
896af83ef6
commit
7531be5cdf
1 changed files with 4 additions and 1 deletions
|
@ -58,9 +58,12 @@ static int zx_reboot_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
err = register_restart_handler(&zx_restart_nb);
|
||||
if (err)
|
||||
if (err) {
|
||||
iounmap(base);
|
||||
iounmap(pcu_base);
|
||||
dev_err(&pdev->dev, "Register restart handler failed(err=%d)\n",
|
||||
err);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue