diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2016-09-14 11:05:31 (GMT) |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2016-09-19 19:25:41 (GMT) |
commit | 7531be5cdfb1e81d25c299be0bcf8e615474e227 (patch) | |
tree | 054f8d8f2365117f117f2a5f58f386edae55bb92 | |
parent | 896af83ef69b0a325816fe270440baa27238f531 (diff) | |
download | linux-7531be5cdfb1e81d25c299be0bcf8e615474e227.tar.xz |
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>
-rw-r--r-- | drivers/power/reset/zx-reboot.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/power/reset/zx-reboot.c b/drivers/power/reset/zx-reboot.c index a5b0096..b0b1eb3 100644 --- a/drivers/power/reset/zx-reboot.c +++ b/drivers/power/reset/zx-reboot.c @@ -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; } |