mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 15:29:16 +00:00
power: reset: hisi-reboot: Unmap region obtained by of_iomap
Free memory mapping, if probe is not successful. Fixes: 4a9b37371822 ("power: reset: move hisilicon reboot code") Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
This commit is contained in:
parent
7a4947cf6f
commit
bae170efd6
@ -53,13 +53,16 @@ static int hisi_reboot_probe(struct platform_device *pdev)
|
||||
|
||||
if (of_property_read_u32(np, "reboot-offset", &reboot_offset) < 0) {
|
||||
pr_err("failed to find reboot-offset property\n");
|
||||
iounmap(base);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
err = register_restart_handler(&hisi_restart_nb);
|
||||
if (err)
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "cannot register restart handler (err=%d)\n",
|
||||
err);
|
||||
iounmap(base);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user