From: Arvind Yadav Date: Wed, 14 Sep 2016 11:05:31 +0000 (+0530) Subject: power: reset: zx-reboot: Unmap region obtained by of_iomap X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7531be5cdfb1e81d25c299be0bcf8e615474e227;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git power: reset: zx-reboot: Unmap region obtained by of_iomap Free memory mapping, if probe is not successful. Signed-off-by: Arvind Yadav Signed-off-by: Sebastian Reichel --- 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; }