power: reset: zx-reboot: Unmap region obtained by of_iomap

Free memory mapping, if probe is not successful.

Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
This commit is contained in:
Arvind Yadav 2016-09-14 16:35:31 +05:30 • committed by Sebastian Reichel
commit 7531be5cdf

View file

@ -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;
}