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

Commit 99d14a1d authored by Linus Walleij's avatar Linus Walleij
Browse files

ARM: integrator: use devm_ioremap() to remap CM



In the PCIv3 driver, use devm_ioremap() instead of just ioremap()
when remapping the system controller in the PCIv3 driver, so
the mapping will be automatically released on probe failure.

Reported-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent bdac7eac
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -842,7 +842,7 @@ static int __init pci_v3_probe(struct platform_device *pdev)
	int irq, ret;

	/* Remap the Integrator system controller */
	ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100);
	ap_syscon_base = devm_ioremap(&pdev->dev, INTEGRATOR_SC_BASE, 0x100);
	if (!ap_syscon_base) {
		dev_err(&pdev->dev, "unable to remap the AP syscon for PCIv3\n");
		return -ENODEV;