Message ID | 1473850539-15721-1-git-send-email-arvind.yadav.cs@gmail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Hi, On Wed, Sep 14, 2016 at 04:25:39PM +0530, Arvind Yadav wrote: > From: Arvind Yadav <arvind.yadav.cs@gmail.com> > > Free memory mapping, if probe is not successful. > > Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Thanks, queued. -- Sebastian
diff --git a/drivers/power/reset/xgene-reboot.c b/drivers/power/reset/xgene-reboot.c index f07e93c..73c3d93 100644 --- a/drivers/power/reset/xgene-reboot.c +++ b/drivers/power/reset/xgene-reboot.c @@ -81,8 +81,10 @@ static int xgene_reboot_probe(struct platform_device *pdev) ctx->restart_handler.notifier_call = xgene_restart_handler; ctx->restart_handler.priority = 128; err = register_restart_handler(&ctx->restart_handler); - if (err) + if (err) { + iounmap(ctx->csr); dev_err(dev, "cannot register restart handler (err=%d)\n", err); + } return err; }