Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 896af83e authored by Arvind Yadav's avatar Arvind Yadav Committed by Sebastian Reichel
Browse files

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



Free memory mapping, if probe is not successful.

Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent f04f7aef
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -81,8 +81,10 @@ static int xgene_reboot_probe(struct platform_device *pdev)
	ctx->restart_handler.notifier_call = xgene_restart_handler;
	ctx->restart_handler.notifier_call = xgene_restart_handler;
	ctx->restart_handler.priority = 128;
	ctx->restart_handler.priority = 128;
	err = register_restart_handler(&ctx->restart_handler);
	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);
		dev_err(dev, "cannot register restart handler (err=%d)\n", err);
	}


	return err;
	return err;
}
}