summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2016-09-14 13:05:31 +0200
committerSebastian Reichel <sre@kernel.org>2016-09-19 21:25:41 +0200
commit7531be5cdfb1e81d25c299be0bcf8e615474e227 (patch)
tree054f8d8f2365117f117f2a5f58f386edae55bb92 /drivers/power
parentpower: reset: xgene-reboot: Unmap region obtained by of_iomap (diff)
downloadlinux-7531be5cdfb1e81d25c299be0bcf8e615474e227.tar.xz
linux-7531be5cdfb1e81d25c299be0bcf8e615474e227.zip
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>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/reset/zx-reboot.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/power/reset/zx-reboot.c b/drivers/power/reset/zx-reboot.c
index a5b009673d0e..b0b1eb3a78c2 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;
}