Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH] power: reset: zx-reboot: Unmap region obtained by of_iomap

5 views
Skip to first unread message

arvind....@gmail.com

unread,
Sep 14, 2016, 7:10:05 AM9/14/16
to
From: Arvind Yadav <arvind....@gmail.com>

Free memory mapping, if probe is not successful.

Signed-off-by: Arvind Yadav <arvind....@gmail.com>
---
drivers/power/reset/zx-reboot.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

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

Sebastian Reichel

unread,
Sep 19, 2016, 3:30:07 PM9/19/16
to
Hi,

On Wed, Sep 14, 2016 at 04:35:31PM +0530, arvind....@gmail.com wrote:
> From: Arvind Yadav <arvind....@gmail.com>
>
> Free memory mapping, if probe is not successful.
>
> Signed-off-by: Arvind Yadav <arvind....@gmail.com>

Thanks, queued.

-- Sebastian
signature.asc
0 new messages